Problem input parameter

Hello
I have a requirement, is that I have a infobjeto operation hour that has the hours that a transaction took place, and I had to build a structure with a range of times, but that touched me to the transformation of one substring operation time to take the first two character of time and store it in another infobjeto created, I have the time as input parameter as date range and give the matchcode the parameter time only shows me the values ​​that holds the master data, but they need select a time range regardless the value is in the master data infobjeto hour.
As I can handle this in the input parameter so that you can select for example from 00:00 to 05:00.
If anyone can help me I appreciate it.
Greetings.
nando

Hi David,
This GROUP_TYPE option is not available anymore in 11.2.0.2 anymore it seems !.
I posted a question about this today on the owb blog that triggered it all for me.
I was trying to work tru your example of Table Function Operators and stumbled upon a OMBplus script that doesn't work anymore.
It now says:
OMB+> OMBALTER MAPPING 'TF_REFCURSOR_PARAM' MODIFY GROUP 'INGRP1' OF OPERATOR 'GET_EMPS' SET PROPERTIES (GROUP_TYPE) VALUES ('REF_CURSOR')
OMB02902: Error setting property GROUP_TYPE of INGRP1: MMM1034: Property GROUP_TYPE does not exist.
And indeed looking at the 11.1. ref doc it is mentioned but not anymore in 11.2.
(search for group_type)
11.1 :
http://download.oracle.com/docs/cd/B28359_01/owb.111/b31279/omb_4create_1.htm
11.2:
http://download.oracle.com/docs/cd/E11882_01/owb.112/e14406/chap3006.htm#GDBBAFBF
But the UI doesn't have the option either !
How do i use a TFO with a ref_cursor ?

Similar Messages

  • Problem displaying checkbox in searchhelp + default fixed input-parameter

    Hello,
    At a CRM 7 project we are facing the following 2 problems with a 'customer'-searchhelp
    I have created the searchhelp in SE11, the data is fetched via a search-help exit, and I call the search-help via the GET_V method of my attribute
    This is working fine ...
    But one of the input-parameters of my search-help should be displayed as a checkbox iso a 1 char field.
    How can I influence this ?
    Normally I would use the GET_I method but this time I do not have the component-name/view ... and even when I did, I assume this is a generic component/view attribute used for every searchhelp
    Second problem is that one input parameter should be defaulted. Normally I can use the INPUT-MAPPING table.
    However this time this is not possible since the value I need to pass is not available as an attribute in my component.
    I tried to use the 'PRESEL' step in my search-help exit, this is working fine when I test in SAP-gui but in the Web-UI the system apparently does not go thru this step.
    Why ?
    Does anyone have an alternative ?
    Best regards,
    Erwin

    Hi,
         If not already done, try using the XFELD data element for the check box field.
    Regards,
    Arun Prakash

  • Problems with Mapping Input Parameter

    Hi everybody,
    just another question. I have a Mapping with an Mapping Input Parameter. If i provide a Parameter with an prefixed 0 e.g.: 01234 the output of this is 1234.
    How can i manage this that the output of the Input Parameter ist 01234 and not like now 1234?
    Many thanks in advance.
    Greetings

    The Mapping Input Parameter is of type varchar2 and it still gives 1234. The Problem is i have to provide the whole input parameter for logging proposes. I managed this now by building a workflow an provide the mapping input parameters to new variables. Now the Input 01234 gives 01234....:-)
    Does anybody know another solution for this problem?
    Greetings

  • Web service data control with complex input parameter problem

    Hi!
    I'm making ADF web app, using JDev 11.1.1.2.0. I have to call a web service (using a data control), which has complex input parameter (array of complex objects).
    I followed steps from Susan Duncan blog: http://susanduncan.blogspot.com/2006/09/dealing-with-complex-input-params-in.html , but I ran into a problem.
    As Susan wrote, I changed submit's button action binding to an operation in a managed bean, which returns array of objects and everything works fine. I can call a WS and my table shows the result.
    The problem is, that after I change button's action binding to my manage bean, row selection in result table doesn't work anymore (I allways get NullPointerException).
    What can be done here?
    Can somebody please help?

    Hi,
    I also have similar type of problem where I need to invoke a Web service with Complex input parameters.
    I followed Susan's blog but I stuck at a point where methos getItem is created.
    Can anyone tell me how to get that method for my requirement.
    If possible can you guys share your solutions here.
    Thanks in advance.

  • Problem in mapping BIGBINARY input parameter

    Hi All,
    I am trying to create an operation of 'OTHER' type in SUP 2.2. The input parameter structure is having an 'BIGBINARY' attribute. This attribute is used to send photos. But the input structure is not coming under client parameters and unable to map it. While generating code for iOS the particular input structure is abandoned.
    So, kindly help me how to handle this...
    Thanks,
    Saju KS

    Hi Neha,
    Please create the custom context node/attribute same structure as RFC model node. then populate the data using below following code :
    - get the size of the RFC model node which you want to populate in the costom node like
    int xxx =  wdContext.node<XXX node>().size;
    - Create onject for custom node like
      I<Custyom Name>Element element = null;
    -  then use for loop for fetching data from Model node and populate in custom node
    for(int i =0; i<xxx; i++)
             element = wdContext.create<Custyom Name>();
             element.set<Attribute Name>(wdContext.node<XXX>().get<XXX>ElementAt(i).get<>Attribute name for model())
             wdContext.<Custyom Name>().addElement(element);
    It will populate in your custom node from model node.
    Hope it will helps you.
    Regards
    Arun

  • Problem with writing a procedure with table name as an input parameter

    Hi all,
    I am writing a procedure with table name as an input parameter:
    below is the code
    create or replace procedure prc(in_tbl in varchar2)
    as
    begin
    execute immediate ' truncate table tlb ';
    insert into tbl
    select a,b,c from in_tbl;
    end;

    user579585 wrote:
    Hi all,
    I am writing a procedure with table name as an input parameter:
    below is the code
    create or replace procedure prc(in_tbl in varchar2)
    as
    begin
    execute immediate ' truncate table tlb ';
    insert into tbl
    select a,b,c from in_tbl;
    end;You'll also need to use dynamic sql for the insert:
    execute immediate 'begin insert into tbl select a,b,c from '||in_tbl||'; end';

  • Log Error : Invalid Input Parameter %s for every SAP B1 Client

    Hi Everybody,
    in my company we have performed SAP B1 upgrade from 2007A to 8.81 PL07, in two steps upgrading first to PL04.
    Everything is working fine for all our clients, we are able to post and work normally with the system.
    The only annoying problem is an error message coming up every minute for every client in the log:
    SQLMessage       Error              I     Technical     Invalid input parameter: %s # #     MID=-1     BOID=-1     BO=     UserID=manager     C:\Program Files (x86)\SAP\SAP Business One\SAP Business One.exe     Version=8.81.315     Area=     PID=1316     TID=4340     D:\depot\BUSMB_B1\8.8_SP1_REL\SBO\8.8_SP1_REL\Application\__Engines\DBM\__DBMC_DataBase.cpp     9547
    I couldn't find anything regarding this topic in the forum, only one similar post but unanswered.
    We are using two server: one for the licence server and one for the database (the database server is clustered)
    Does anyone have any idea about this? Has it ever happened to anybody?
    Thanks for your help

    Hi Julie,
    it must be a triggered action from the system. The only problem is that log files grow very big, few mb every day, and it is a situation that's not very ideal. And also i don't want to turn them off because it is always a good resource for other errors.
    It is very strange that SAP hasn't noticed this behaviour and there isn't any note available for the purpose.
    Thanks for your help

  • Problem getting parameter  values at the service end point

    I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
    I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
    �     Service End Point Definition (in EJB)
    public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
    System.out.println(propertyName);
    System.out.println(PMSCode);
    System.out.println(streetNumPrefix);
    ........ taking printout of all the paramters
    �     This is my WSDL file
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="NMServiceServantInterface_setNewAddress">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
    <part name="String_3" type="xsd:string"/>
    <part name="String_4" type="xsd:string"/>
    <part name="int_5" type="xsd:int"/>
    <part name="String_6" type="xsd:string"/>
    <part name="int_7" type="xsd:int"/>
    <part name="String_8" type="xsd:string"/>
    <part name="String_9" type="xsd:string"/>
    <part name="String_10" type="xsd:string"/>
    <part name="String_11" type="xsd:string"/>
    <part name="String_12" type="xsd:string"/>
    <part name="String_13" type="xsd:string"/>
    <part name="String_14" type="xsd:string"/>
    <part name="String_15" type="xsd:string"/>
    <part name="String_16" type="xsd:string"/>
    <part name="String_17" type="xsd:string"/>
    <part name="String_18" type="xsd:string"/>
    <part name="int_19" type="xsd:int"/>
    <part name="int_20" type="xsd:int"/>
    <part name="String_21" type="xsd:string"/>
    <part name="String_22" type="xsd:string"/>
    <part name="int_23" type="xsd:int"/>
    <part name="int_24" type="xsd:int"/>
    <part name="String_25" type="xsd:string"/>
    <part name="String_26" type="xsd:string"/>
    <part name="String_27" type="xsd:string"/>
    <part name="int_28" type="xsd:int"/>
    <part name="int_29" type="xsd:int"/>
    <part name="int_30" type="xsd:int"/>
    <part name="String_31" type="xsd:string"/>
    <part name="String_32" type="xsd:string"/>
    <part name="int_33" type="xsd:int"/>
    <part name="int_34" type="xsd:int"/>
    <part name="String_35" type="xsd:string"/></message>
    <message name="NMServiceServantInterface_setNewAddressResponse">
    <part name="result" type="xsd:string"/></message>
    <portType name="NMServiceServantInterface">
    <operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
    <input message="tns:NMServiceServantInterface_setNewAddress"/>
    <output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
    <binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
    <operation name="setNewAddress">
    <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
    <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
    <soap:operation soapAction=""/></operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
    <service name="NMService">
    <port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
    <soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
    �     I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
    If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
    Thanks

    I just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
    This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy .

  • Error while trying to choose query parameter Inconsistent input paramete

    I got error on PRD while trying to choose parameter before executing BEX query:
    101 Inconsistent input parameter (parameter: <unknown>, value <unknown>)
    100 Program error in class SAPMSYY1 method: UNCAUGHT_EXCEPTION
    Notes:
    the same functionality works fine in DEV environment.
    the other parameters on query in PRD work fine
    the parameter  with error based on custom hierarchy
    P.S. I heart BEx :]

    Hello,
    This problem has been solved before with notes 1236774, 1151320 & 1264213.
    Please check.
    Thanks,
    Michael

  • How to disabled the input parameter dialog box in crystal reports 9

    Post Author: Murtaza
    CA Forum: General
    Hi friends,I have got stuck with a weird problem.  In my
    crystal report, I have set up some input parameters.  I am setting
    values for these parameters somewhere inside code.  But I don't
    want to show the default input parameter dialog box. Under any case,
    user should not see the ugly parameter dialog box that crystal
    presents.   Please suggest me how I can achieve
    this.  I cannot do this through code, because our environment does
    not allow that.  I have to do this in crystal reports viewer and
    by setting some property of the crystal report object. But everything
    must be done on UI, not through code. So, the solution should not be the following. 
    // step before step 1
    // **** the line needs to refer to the report and be set before setting
    ReportSource in the viewer to myReport
    myReport.EnableParameterPrompting = False
    Any help would be greatly appreciated.  Murtaza

    Post Author: sleahcim
    CA Forum: General
    Hi Murtaza,
    Unfortunately, I am not aware of any method to suppress the prompt for the input parameters, but still use them.  It is truly a design-related issue for the report.  The reason that the prompt appears is because the parameter it is prompting for is used in the report; in particular either the Group or Record Selection, or referenced in another formula.
    The only way I can think of to not show the prompt, is to not use the parameter in the report.  You did mention that you are setting the value of the parameter inside of the report -- are you doing this through using a formula?  Perhaps you can just remove the parameter and only use the formula that you are setting the default values with.
    -Michael

  • Error while setting input parameter for dynamic process - GP

    Hi All,
    I am using CAF 7.1 GP.
    Here I have to start a process dynamically and it is working fine.
    But, when I tried to set value for input parameter of this process by
    IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
    params.setAttributeValue("Val","MyValue");
    ( <b>Val</b> is the name of grouped input parameter ), it is giving
    com.sap.caf.eu.gp.exception.api.GPInvocationException: Structure with name input and namespace http://wwww.sap.com/nw/eup/gp does not have an attribute with name Val and namespace null.
    But no where I have mentioned http://wwww.sap.com/nw/eup/gp.
    I dont have any structures in my input and output.
    Here is my full code
           try
                IGPProcess process = null;
                IUser tl_user =UMFactory.getUserFactory().getUserByLogonID("fahad");
                     IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(tl_user);//, user.getLocale());
                     process =GPProcessFactory.getDesigntimeManager().getActiveTemplate("F5D76840A56F11DC983B001966243CAD",userContext);
                     wdComponentAPI.getMessageManager().reportSuccess("Title of process is "+process.getTitle());
                     IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
                     IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
                     int rolenum = process.getRoleInfoCount();
                     wdComponentAPI.getMessageManager().reportSuccess("Number is "+rolenum);
                     IGPProcessRoleInstance roleInstance=null;
                     IUser ho_User=null;
                     for (int i = 0; i < rolenum; i++)
                             wdComponentAPI.getMessageManager().reportWarning("Role Text is "process.getRoleInfo(i).getText()"  Role Name is "+process.getRoleInfo(i).getRoleName());
                             if(i==1)
                                  ho_User = UMFactory.getUserFactory().getUserByLogonID("poornendu");
                                  roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                                  roleInstance.addRuntimeDefinedUser(ho_User);
                                  roles.addProcessRoleInstance(roleInstance);
                             if(i==2)
                                  ho_User = UMFactory.getUserFactory().getUserByLogonID("fahad");
                                  roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                                  roleInstance.addUser(ho_User);
                                  roles.addProcessRoleInstance(roleInstance);
                     wdComponentAPI.getMessageManager().reportSuccess(""+process.getStructure().getItemCount());
                     IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
                     wdComponentAPI.getMessageManager().reportSuccess("Title of process is "+process.getTitle());
                     <b>params.setAttributeValue("Val","MyValue");</b>                     
                     String pName=wdContext.currentContextElement().getProcessName();
                     IGPProcessInstance prInstance = rtm.startProcess(process,pName,"This process has been started using the GP public API",tl_user,roles,params,tl_user);
           catch(Exception e)
                wdComponentAPI.getMessageManager().reportException(""+e);
    Can anyone help me on this.
    Thanks,
    Fahad Hamsa

    Hi Experts,
    I solved it myself.
    The problem was, I have to make the input parameter as exposed. Thats all
    Anyway, thanks for the support.
    Regards,
    Fahad Hamsa

  • Calling a stored procedure with a CLOB as input parameter

    Hello,
    I was unsuccessfully trying to call a stored procedure with a clob as input parameter from my C++ application using occi.
    Anyone got a working example to look at?
    I already checked the thread Invalid OCI handle when creating a Blob which didn't help.
    The problem seems to be that I don't have a lob locator to write my data (xml file) to. I tried creating a temporary clob using the sys.dbms_lob package which only resulted in a major headache on my part...
    I would appreciate any help.
    Kind regards
    Horst
    my environment:
    Visual Studio 2008, C++ application
    Oracle 11g

    To start using a blob you have to insert it into the database and then get it back. Sounds weird but that is how it is. Here is a very simple program to do this:
    #include<occi.h>
    #include <iostream>
    using namespace oracle::occi;
    using namespace std;
    int main()
      try
        Environment *env = Environment::createEnvironment(Environment::OBJECT);
        Connection *conn = env->createConnection("hr","hr","");
        string stmt1 = "insert into blob_tab values (:1) ";
        string stmt2 = "select col1 from blob_tab";
        Blob blob(conn);
        blob.setEmpty(conn);
        Statement *stmtObj = conn->createStatement(stmt1);
        stmtObj->setBlob(1,blob);
        stmtObj->executeUpdate();
        conn->commit();
        Blob blob1(conn);
        Statement *stmtObj2 = conn->createStatement(stmt2);
        ResultSet *rs = stmtObj2->executeQuery();
        while(rs->next())
         blob1 = rs->getBlob(1);
        string stmt3 = "begin my_proc(:1) ;end;";
        Statement *stmtObj3 =  conn->createStatement(stmt3);
        stmtObj3->setBlob(1,blob1);
        stmtObj3->executeUpdate();
      catch (SQLException e)
        cout << e.getMessage();
      /* The tables and procedure are primitive but ok for demo
        create table blob_tab(col1 blob);
        create or replace procedure my_proc(arg in blob)
        as
        begin
         -- just a putline here. you can do other more meaningful operations with the blob here
          dbms_output.put_line('hello');
       end;
    }Hope this helps.
    Thanks,
    Sumit

  • A required input parameter could not be read

    Hi
    I'm experiencing a random problem with my e-mail account. Before moving everybody into using this mail server, I believe I should understand how to fix this problem. Here I go. Last Friday, everything was working properly with my e-mails. However, this morning, I cannot connect to the mail server anymore (using SSL and Kerberos). I looked at the logs and this is what I see:
    Jan 18 08:47:43 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While processing incoming data: A required input parameter could not be read
    Jan 18 08:47:43 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While processing incoming data: Unknown error
    Jan 18 08:47:43 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While processing incoming data: A required input parameter could not be read
    Jan 18 08:47:43 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While processing incoming data: Unknown error
    Jan 18 08:47:43 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While processing incoming data: A required input parameter could not be read
    Jan 18 08:47:43 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While processing incoming data: Unknown error
    Anyone ever had this "unknown error”? Is there a known way to fix it?
    Thanks

    Apparently the problem changed:
    Jan 18 09:35:50 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While acquiring service credentials: An invalid name was supplied
    Jan 18 09:35:50 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While acquiring service credentials: Hostname cannot be canonicalized
    Jan 18 09:35:54 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While acquiring service credentials: An invalid name was supplied
    Jan 18 09:35:54 xs1 dovecot[68]: auth(default): gssapi(?,192.168.0.170): While acquiring service credentials: Hostname cannot be canonicalized
    Any idea about that issue too ?

  • Passing the same input parameter twise in execute sql task

    Hi All, I want to insert some values to 3 different tables in sql server. Execute sql task is used to populate three tables. Here is the sql statement.
    DECLARE @Dt AS DATE
    SET @Dt = ?
    INSERT INTO TABLE1 SELECT ?, COL2, COL3 FROM TABLE_A
    INSERT INTO TABLE2 SELECT ?, COL2, COL3 FROM TABLE_B
    Input parameter is mapped as follows :
    Variable name : User::EffectiveDate
    Direction : Input Data Type :
    Date Parameter name :0
    Parameter size :-1
    User::EffectiveDate is datetime variable.
    When the package is executed, it throws an error.
    [Execute SQL Task] Error: Executing the query " " failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems
    with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. I am not sure what I am doing wrong here. If anyone could point me to the right direction, I really appreciate.
    Thanks
    shamen

    To expand on the other answers.
    Your SQL command
    DECLARE @Dt AS DATE
    SET @Dt = ?
    INSERT INTO TABLE1 SELECT ?, COL2, COL3 FROM TABLE_A
    INSERT INTO TABLE2 SELECT ?, COL2, COL3 FROM TABLE_B
    It using 3 input variables.  I assume you didn't pass 3 variables and you want @DT to be column 1 in each.  In that case you would use:
    DECLARE @Dt AS DATE
    SET @Dt = ?
    INSERT INTO TABLE1 SELECT @Dt, COL2, COL3 FROM TABLE_A
    INSERT INTO TABLE2 SELECT @Dt, COL2, COL3 FROM TABLE_B

  • How Insert the input parameter to database through Java Bean

    Hello To All..
    I want to store the input parameter through Standard Action <jsp:useBean>.
    jsp:useBean call a property IssueData. this property exist in
    SimpleBean which create a connection from DB and insert the data.
    At run time when I click on submit button servlet and server also show that loggging are saved in DB.
    But when I open the table in Access. Its empty.
    Ms-Access have two fields- User, Pass both are text type.
    Please review these code:
    login.html:
    <html>
    <head>
    <title>A simple JSP application</title>
    <script language=javascript>
    function f(k)
    document.forms['frm'].mykey.value=k;
    document.forms['frm'].submit();
    </script>
    <head>
    <body>
    <form method="get" action="tmp" name="frm">
    Name: <input type="text" name="User">
    Password: <input type="password" name="Pass">
    <input type=hidden name="mykey" value="">
    <input type="button" value="Submit" onclick="f('submit.jsp')">
    <input type="button" value="Issue" onclick="f('issue.jsp')">
    </form>
    </body>
    </html>LoginServlet.java:import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String User=request.getParameter("User");
    String Pass=request.getParameter("Pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setUser(User);
    st.setPass(Pass);
    request.setAttribute("User",st);
    request.setAttribute("Pass",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("/"+request.getParameter("mykey"));
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }SimpleBean.java:package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean
    private String User="";
    private String Pass="";
    private String s="";
    public SimpleBean(){}
    public String getUser() {
    return User;
    public void setUser(String User) {
    this.User = User;
    public String getPass() {
    return Pass;
    public void setPass(String Pass) {
    this.Pass = Pass;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getUser();
    getPass();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:simple");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String User=getUser();
    st.setString(1,User);
    String Pass=getPass();
    st.setString(2,Pass);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return this.s;
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }submit.jsp:
    This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("User")).getUser() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("Pass")).getPass() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request"/>
    <jsp:setProperty name="st" property="User" value="request.getParamaeter("Pass")"/>
            <jsp:setProperty name="st" property="Pass" value="request.getParamaeter("Pass")"/>
       <jsp:getProperty name="st" property="issueData"/>
    <% st.getissueData(); %>
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>issue.jsp</jsp-file>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Please Help me..

    Dear Sir,
    Accordingly your suggestion I check the SimpleBean class putting the constant values in this bean class.That is Sucessfully Inserted constant values in database.
    Like for example..
    myfirstjavabean.java:
    package myfirstjava;
    import java.io.*;
    import java.sql.*;
    public class myfirstjavabean
    private String firstMsg="Hello world";
    private String s="";
    public myfirstjavabean()
    public String getfirstMsg()
    return firstMsg;
    public void setfirstMsg(String firstMsg)
    this.firstMsg=firstMsg;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getfirstMsg();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:sampleMsg");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String Msg=getfirstMsg();
    st.setString(1,Msg);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return this.s;
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }Vij.jsp:
    <html>
    <body>
    <jsp:useBean id="st" class="myfirstjava.myfirstjavabean" scope="request" />
    <jsp:getProperty name="st" property="firstMsg" />
    <jsp:getProperty name="st" property="issueData" />
    </body>
    </html>These above example sucessfully inserted the Hello World message in database.
    But which value I put user input at run time Its not inserted in database.
    Which is my previous problem that is persist.
    Please Help..

Maybe you are looking for

  • IMac will not boot up when printer is plugged in USB

    After buying my new iMac (with Tiger) I successfully transfered everything from my old iMac (with Panther) and all was well. The problem is that when my printer (Canon Pixma MP130) is plugged in on start up, the iMac will not boot up (no gears turnin

  • How to upgrade NetWeaver 2004 SS19 to 2004s SPS10????

    Hi, I cannot find any useful information on HOW to do this.  Some links I follow eventually lead me to this page: https://websmp201.sap-ag.de/~sapidb/011000358700001130682005E which say that if you're running NW2004 SS19, it must be upgraded to SPS10

  • I can not make 16bit tiff file out

    Hello. This is kamecame from japan. I am seeing this US board because Japanese discussion board is not active. I have a queation about shake. I hope to convert Quick Time(motion jpg)to Tiff file format(16bit LZW). I made a success of 8bit Tiff file o

  • Controlling chart scale

    I have created line chart. Where time is at x-axis and pressure is at y-axis. My actual pressure values are within range of 900 to 1000. I want to modify scale of y-axis so that instead of showing a scale from 0 to 1000, the scale range for y-axis sh

  • Exporting Quicktimes from Premiere Pro

    When exporting video from Premiere pro, uncompressed or HD 1080i Quicktime settings crash my machine every time , any idea why? I'm trying to find the best export to give to a colleague working remotely on a mac using aftereffects