Passing Objects via Request

I have a very simple problem that is bugging me to death. I've created a simple logon page that authenticates against an ldap directory. Once the authentication has completed successfully I create a user detail object which. Upon success the action returns success and I need to pass that UserDetails object to the forwarding page to display the data. What is the best method to do this? Thanks for the help guys.

If you're forwarding from one view to another via navigation, then in the action that submits the form, store the object in the RequestMap or SessionMap:
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(<name>,<object>);or
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put(<name>,<object>);You can then refer to this object via the expression #{requestScope.name} where name was the value you used when storing in the map.

Similar Messages

  • Passing large objects in request

    Is it bad practice to pass large objects such as an ArrayList with large amounts of data in the request object? Will it impact performance?

    dorr67 wrote:
    Yes, to be more specific, I'm creating a List from my DAO and putting in the HttpServletRequest object using request.setAttribute("dataList", dataList), then retrieving the List in the jsp to render a datagrid. I was concerned if this could be a problem down the road when dealing with large amounts of data in the list. Pagination will be handled in the grid component, but I was concerned with getting the data source to the grid. I'm using Spring so if there is a more efficient manner to do this, please let me know.
    Thanks.Sounds like it doesn't scale good if you have lots of users, but it's only a reference to the list that is passed around.
    Kaj

  • How to pass a HTTP request from a simple java class

    Is it possible to pass an HTTP request from a simple java class.if yes how?

    Is it possible to pass an HTTP request from a simple
    java class.if yes how?If you're talking about creating a HttpRequest object and passing it to a servlet, that would be a red flag to me that your design is flawed. You shouldn't have to do that - the application server (Tomcat, Weblogic, etc) should be the only thing that has to worry about creating that kind of object and passing it to you.

  • Passing object as parameter in JSF using h:commandLink tag

    Hi ,
    I have a scenario in which i need to pass objects from one jsp to another using h:commandLink. i read balusC article "Communication in JSF" and found a basic idea of achieving it. Thanks to BalusC for the wonderful article. But i am not fully clear on the concepts and the code is giving some error. The code i have is
    My JSP:
    This commandlink is inside a <h:column> tag of <h:dataTable>
    <h:commandLink id="ol3"action="ManageAccount" actionListener="#{admincontroller.action}" >
                   <f:param id="ag" name="account" value="#{admincontroller.account}" />
                   <h:outputText id="ot3" value="Manage Account" rendered="#{adminbean.productList!=null}" />
                   </h:commandLink>
    Also a binding in h:dataTable tag with the  binding="#{admincontroller.dataTable}"
                      My Backing Bean:
    public class CompanyAdminController {
              private HtmlDataTable dataTable;
              private Account account=new Account();
    public HtmlDataTable getDataTable() {
            return dataTable;
    public Account getAccount() {
             return this.account;
    public void setAccount(Account account) {
              this.account = account;
          public void action(){
                account= (Account)this.getDataTable().getRowData();
           } faces-config.xml
    <navigation-rule>
        <from-view-id>/compadmin.jsp</from-view-id>
        <navigation-case>
          <from-outcome>ManageAccount</from-outcome>
          <to-view-id>/manageAccount.jsp</to-view-id>
        </navigation-case>
      </navigation-rule>
    <managed-bean>
              <managed-bean-name>admincontroller</managed-bean-name>
              <managed-bean-class>com.forrester.AdminController</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>account</property-name>
                   <property-class>com.model.Account</property-class>
                   <value>#{param.account}</value>
             </managed-property>
         </managed-bean>My account object:
    public class Account {
    string name;
      public String getName()
        return this.name;
      public void setName(String name)
           this.name=name;
      }I need to display #{admincontroller.account.name} in my forwarded jsp. But I am not sure whether the code i wrote in commandlink is correct. I get an error if i use <f:setActionListener> . No tag "setPropertyActionListener" defined in tag library imported with prefix "f"
    Please advise.
    Edited by: twisai on Oct 18, 2009 11:46 AM
    Edited by: twisai on Oct 18, 2009 11:47 AM
    Edited by: twisai on Oct 18, 2009 11:48 AM

    Yes.. iam removed the managedproperty from faces-config. But still i get the null pointer exception on main jsp itself and i am taken to second jsp manageaccount.jsp. Did you find anything wrong in my navigation case in the action method??
                                     public String loadAccount(){
               Account account = (Account)this.getDataTable().getRowData();
                return "ManageAcct";And also can you please answer this question i have
    The AdminController is the backing bean of 1st JSP and manageAccontController is the backing bean of forwarded JSP .
    Can i put this action method and dataTable binding in a 2nd manageAccontController backing bean instead of AdminController. But if i do that way dataList binding in h:dataTable tag will be in first JSP backing bean and dataTable binding to 2nd JSP. Not sure how to deal with this.
    {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error in sending object via a JMS..

    The JMS is giving me error when i am sending an object via a sender...i am using point to point,...and Weblogic server....
    the whole thing of object sending works when i run it in two different consoles...i
    but when i move to webworld....i e tomcat it shows me the following exception.....
    weblogic.jms.common.JMSException: Error deserializing object
    at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:144)
    at intertec.jms.ObjectReceiver1.onMessage(ObjectReceiver1.java:64)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.Kernel.execute(Kernel.java:336)
    at weblogic.kernel.Kernel.execute(Kernel.java:360)
    at weblogic.kernel.Kernel.execute(Kernel.java:348)
    at weblogic.jms.client.JMSSession.pushMessage(JMSSession.java:2392)
    at weblogic.jms.client.JMSSession.invoke(JMSSession.java:2919)
    at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:609)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsyncInternal(DispatcherImpl.java:128)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchOneWay(DispatcherImpl.java:312)
    at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Caused by: java.lang.ClassNotFoundException: intertec.beans.Emp
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:891)
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:756)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at weblogic.jms.common.ObjectMessageImpl$ObjectInputStream2.resolveClass(ObjectMessageImpl.java:305)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
    at java.util.Hashtable.readObject(Hashtable.java:841)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
    at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:130)
    ... 21 more
    thanks in advance....
    regards
    ullas

    You are missing a class:
    Caused by: java.lang.ClassNotFoundException: intertec.beans.Emp

  • Passing querystring via alias application call

    Hello everyone,
    first of all I'm not quite sure if this is the correct forum for my question so please excuse me if it's the wrong one.
    We're using short urls (alias) to call a application in our portal. For example http://sapportal/alias_test will be transalated to something like http://host:port/irj/portal?NavigationTarget=ROLES://portal_content/content/1/2/3
    So far so good. Now I want to pass a parameter via the alias (http://sapportal/alias_test?param=value). This will be translated into http://host:port/irj/portal?NavigationTarget=ROLES://portal_content/content/1/2/3?param=value. For some reason the parameter cannot be read via request->get_form_field( 'param' ). Calling the application with a parameter directly via the controller works just fine.
    You might need to know that http://host:port/irj/portal?NavigationTarget=ROLES://portal_content/content/1/2/3 is using an iView to execute the BSP application. In the settings for this iView I can define application parameters, however, this won't help since the value I want to pass with the alias is dynamic.
    Any idea how I could solve this issue?
    Please let me know if you need any further information.
    Thank you in advance.

    You're only 50% correct at what you're saying. I managed to find a solution on my own and it's working.
    In the controller I'm using request->get_header_fields to read the referer field. This contains the translated url including the querystring for the alias. Extracting the parameter is rather easy then.
    In other words: It's possible to read parameters for the situation given but it's not as easy as reading parameters passed by a form.
    For your Information: The link is used in an E-Mail where I don't want to have a full url. And even if I would use a full url (the translated url) it wouldn't help since the parameter would still not be passed to the application.
    Anyway. It's solved.

  • Yet Another "Passing Objects" Thread

    Hi All,
    Quick question about passing objects:
    I have three classes - ClassA, ClassB and ClassC. Lets say I create an object of ClassA in ClassB. Also, I would like to send the ClassA object from ClassB to ClassC to update its data. My question is, can I set the ClassA object in ClassC and modify it through ClassB? Confusing? I'll try to create an example below.
    ClassA:
    public class ClassA {
           // data
    } ClassB: creates and calls update methods for ClassA object
    public class ClassB {
           ClassA object = new ClassA();
           // print object
           ClassC ClassCFacade = new ClassC();
           ClassCFacade.setClassAObject(object);
           ClassCFacade.updateClassAObject(object);
           // print object
    }ClassC: updates object
    public class ClassC {
          // set object
          public void setClassAObject(ClassA object) {
                   // sets object
          // get object
          public ClassA getClassAObject() {
                  // returns object
          // modify object
          public updateClassAObject() {
                ClassA o = getClassAObject()
                // modify o
                setClassAObject(o)
    }So if objects are passed by reference, handle, or whatever you call it, essentially the above code should modify ClassA object created in ClassB, meaning the ClassA object should display it was modified after second print in ClassB. Although I've tried this implementation and the ClassA object is not modified after updateClassAObject method call from ClassB.
    Any input would be appreciated.
    Thanks,
    Bob

    OK. Here's snippets of actual code:
    public class ClassA implements SessionBean, ClassARemoteBusiness {
        // ClassA Attributes
        Integer ID;
        String name;
        // SET METHODS
        public void setClassAID(Integer ID) {
            this.ID = ID;
        public void setClassAName(String name) {
            this.name = name;
        // GET METHODS
        public Integer getClassAID() {
            return ID;
        public String getCLassAName() {
            return name;
    import classa.ClassA;
    import classc.ClassC;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ClassB extends HttpServlet {
        private ClassA object;   
        private ClassC ClassCFacade;
        private ClassCFacade = lookupClassCBean();
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
              HttpSession session = request.getSession();           
              // display object values - displays default values
              out.println("ID: " +object.getClassAID());
              out.println("Name: " +object.getClassAName());
             // update object
             ClassCFacade.setClassAObject(object);
             ClassCFacade.updateClassAObjectID(someInteger);
             ClassCFacade.updateClassAObjectName(someName);
              // display object values - displays updated values
              out.println("ID: " +object.getClassAID());
              out.println("Name: " +object.getClassAName());
        // LOOKUP METHODS
        private web.ServiceLocator serviceLocator;
        private web.ServiceLocator getServiceLocator() {
            // service locator code
        private classc.ClassCRemote lookupClassCBean() {
            // lookup code       
    import classa.ClassA;
    public class ClassC implements SessionBean, ClassCRemoteBusiness {
        private ClassA o;
        // SET METHODS
        public void setClassAObject(ClassA object) {
            o = object;
        // UPDATE
        public void updateClassAObjectID(Integer ID) {
            o.setClassAID(ID);
        public void updateClassAObjectName(String name) {
            o.setClassAName(name);
    }

  • Insert a Child Object via WS 2.0

    Hi Everyone,
    Could someone please guide to Insert a Child Object via WS 2.0.
    Any snippet / code would be highly appreciated.
    Thanks in advance.
    Regards

    Below SOAP Message deplicts the information requested
    <soapenv:Body>
    <ns:AccountInsert_Input>
    <data:ListOfAccount>
    <data:Account>
              <data:Id>AAPA-480SXV</data:Id>
    <data:ListOfNote>
    <data:Note operation="insert">
    <data:Subject>Notes Testing</data:Subject>
    <data:Description>Note Testing</data:Description>
    </data:Note>
    </data:ListOfNote>
    </data:Account>
    </data:ListOfAccount>
    </ns:AccountInsert_Input>
    </soapenv:Body>
    Regards,
    Deepak H Andeli

  • StringBuffer Object  in Request

    Hi,
    How to pass StringBuffer Object From JSP to Struts Action.that's i have to get the String Buffer Object from Request .Instead of Using Session
    Regards
    john
    +91 9791132453

    Parameters to servlets/jsps can only be strings.
    Is there any reason it can't be a String object as opposed to a StringBuffer?
    The only way this would work is if you sent the String as a value on the JSP, and then re-submitted it to the server.
    Thats a round trip for the value. If the value is not too large, you should be ok, but given you are using StringBuffer I kinda doubt thats the case :-).
    Cheers,
    evnafets

  • Creating HR objects via IDoc HRMD_A05

    Hi to all
    I want to create HR objects via IDoc HRMD_A05 and want the objects numbered using INTERNAL number range.
    The IDoc documentation says to pass an exclamation mark '!' to OBJID to make the system generate new number. However, the field is numeric and can not contain '!'.
    Has anybody tried this way before and achieved to create objects numbered internally?
    Thanks

    Hi
    I have told the issue to the SAP OSS and their feedback was:
    "As explained in note 741165:
    'There is no provision to carry out an internal number assignment using
    ALE in the target system. Therefore, the numbers must be assigned when
    the IDOCs are created in the source system.'
    The documentation in the Interface Repository is wrong.
    Regards
    *--Serdar

  • Passing objects by reference in PL/SQL

    Hi,
    I have come across an unexpected problem using object types in PL/SQL that is causing me some grief. I'm from a Java background and am relatively new to Oracle Objects but what I'm trying to do is fairly trivial, I think. The code below illustrates the problem.
    --- cut here ---
    CREATE OR REPLACE TYPE test_obj_t AS OBJECT
    num INTEGER,
    CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT
    CREATE OR REPLACE TYPE BODY test_obj_t IS
    CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT IS
    BEGIN
    num := 0;
    RETURN;
    END;
    END;
    CREATE OR REPLACE PACKAGE test_obj_ref AS
    PROCEDURE init(o IN test_obj_t);
    PROCEDURE inc;
    FUNCTION get_num RETURN INTEGER;
    END;
    CREATE OR REPLACE PACKAGE BODY test_obj_ref IS
    obj test_obj_t;
    PROCEDURE init(o IN test_obj_t) IS
    BEGIN
    obj := o;
    END;
    PROCEDURE inc IS
    BEGIN
    obj.num := obj.num + 1;
    END;
    FUNCTION get_num RETURN INTEGER IS
    BEGIN
    RETURN obj.num;
    END;
    END;
    --- cut here ---
    The object type test_obj_t holds a integer and the test_obj_ref package holds a 'reference' to an instance of the object.
    To test the above code I run this PL/SQL block:
    declare
    obj test_obj_t;
    begin
    obj := test_obj_t;
    test_obj_ref.init(obj);
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    test_obj_ref.inc;
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    test_obj_ref.inc;
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    end;
    giving the output:
    obj.num=0
    test_obj_ref.get_num=0
    obj.num=0
    test_obj_ref.get_num=1
    obj.num=0
    test_obj_ref.get_num=2
    It appears that the object held by the test_obj_ref package is being incremented as expected, but I would have expected the object declared in the PL/SQL block to be pointing to the same object and so should report the same incremented values.
    I suspect that the object is copied in the call to test_obj_ref.init() so I end up with two object instances, one that is held by the test_obj_ref package and one in the anonymous block. Although, I thought that all IN parameters in PL/SQL are passed by reference and not copied!
    Am I right?
    Is passing objects by reference possible in PL/SQL, if so how?
    I'm using Oracle 10.2.0.3.
    Cheers,
    Andy.

    the object being passed to the test_obj_ref.init+ procedure is passed by reference; however, when you assign it to your package variable obj it is being copied to a new instance. you can pass object instances as parameters to procedures using the +IN OUT [NOCOPY]+ *calling mode, in which case modifications to the attributes of the passed object will be reflected in the calling scope's instance variable.
    oracle's only other notion of an object reference is the +"REF &lt;object-type&gt;"+ datatype, which holds a reference to an object instance stored in an object table or constructed by an object view.
    hope this helps...
    gerard

  • Calling a new browser window with WD Abap and passing data via POST

    Hi there,
    does anybody know whether passing data via POST method is possible when opening a new browser window from within a Web Dynpro Component? In my case I use method IF_WD_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW for opening a new browser window. Now I want to pass a big amount of data which is only possible via POST method. How can I achieve that or is it not considered inside the Web Dynpro Framework?
    Kind regards,
    Albert

    Hi Priya,
    can you please explain a little bit more what you mean? I didn't get it..
    Kind regards,
    Albert

  • Best practice "changing several related objects via BDT" (Business Data Toolset) / Mehrere verbundene Objekte per BDT ändern

    Hallo,
    I want to start a
    discussion, to find a best practice method to change several related master
    data objects via BDT. At the moment we are faced with miscellaneous requirements,
    where we have a master data object which uses BDT framework for maintenance (in
    our case an insured objects). While changing or creating the insured objects a
    several related objects e.g. Business Partner should also be changed or
    created. So am searching for a best practices approach how to implement such a
    solution.
    One Idea was to so call a
    report via SUBMIT AND RETURN in Event DSAVC or DSAVE. Unfortunately this implementation
    method has only poor options to handle errors. Second it is also hard to keep LUW
    together.
    Another idea is to call an additional
    BDT instance in the DCHCK-event via FM BDT_INSTANCE_SELECT and the parameters
    iv_xpush_classic = ‘X’ and iv_xpop_classic = ‘X’. At this time we didn’t get
    this solution working correctly, because there is always something missing
    (e.g. global memory is not transferred correctly between the two BDT instances).
    So hopefully you can report
    about your implementations to find a best practice approach for facing such
    requirements.
    Hallo
    ich möchte an der Stelle eine Diskussion starten um einen Best Practice
    Ansatz zu finden, der eine BDT Implementierung/Erweiterung beschreibt, bei der
    verschiedene abhängige BDT-Objekte geändert werden. Momentan treffen bei uns
    mehrere Anforderungen an, bei deinen Änderungen eines BDT Objektes an ein
    anderes BDT Objekte vererbt werden sollen. Sprich es sollen weitere Objekte geänderte
    werden, wenn ein Objekt (in unserem Fall ein Versicherungsvertrag) angelegt
    oder geändert wird (zum Beispiel ein Geschäftspartner)
    Die erste unserer Ideen war es, im Zeitpunkt DSAVC oder DSAVE einen
    Report per SUBMIT AND RETURN aufzurufen. Dieser sollte dann die abhängigen Änderungen
    durchführen. Allerdings gibt es hier Probleme mit der Fehlerbehandlung, da
    diese asynchrone stattfinden muss. Weiterhin ist es auch schwer die Konsistenz der
    LUW zu garantieren.
    Ein anderer Ansatz den wir verfolgt hatten, war im Zeitpunkt
    DCHCK per FuBA BDT_INSTANCE_SELECT und den Parameter iv_xpush_classic = ‘X’ and
    iv_xpop_classic = ‘X’ eine neue BDT Instanz zu erzeugen. Leider konnten wir diese
    Lösung nicht endgültig zum Laufen bekommen, da es immer Probleme beim
    Übertragen der globalen Speicher der einzelnen BDT Instanzen gab.
    Ich hoffe Ihr könnt hier eure Implementierungen kurz beschreiben, dass wir
    eine Best Practice Ansatz für das Thema finden können
    BR/VG
    Dominik

  • CS3 New smart object via copy not working

    1. I open an image in Photoshop CS3 from camera raw (CR) as a smart object.
    2. I right click on the layer and choose "new smart object via copy."
    3. I double click on the thumb nail to open the image in CR.
    4. I make new edits on the image in CR.
    5. I click OK.
    6. In CS3 both the new layer and the original layer show the edits done in # 4.
    I uninstalled and reinstalled CS# to no avail.
    I am running CS3 on a Win Vista 64 bit.
    If anyone can make a suggestion, I thank you in advance.
    JB

    I should say I am trying to learn this software and stumbling through Mr. Kelby's 7 Point System book.
    I found my error.  I was highllighting the layers not clicking the eye icons off and on.
    Thanks for all who look.
    JB

  • Memory leak problem while passing Object to stored procedure from C++ code

    Hi,
    I am facing memory leak problem while passing object to oracle stored procedure from C++ code.Here I am writing brief description of the code :
    1) created objects in oracle with the help of "create or replace type as objects"
    2) generated C++ classes corresponding to oracle objects with the help of OTT utility.
    3) Instantiating classes in C++ code and assigning values.
    4) calling oracle stored procedure and setting object in statement with the help of setObject function.
    5) deleted objects.
    this is all I am doing ,and getting memory leak , if you need the sample code then please write your e-mail id , so that I can attach files in reply.
    TIA
    Jagendra

    just to correct my previous reply , adding delete statement
    Hi,
    I am using oracle 10.2.0.1 and compiling the code with Sun Studio 11, following is the brief dicription of my code :
    1) create oracle object :
    create or replace type TEST_OBJECT as object
    ( field1 number(10),
    field2 number(10),
    field3 number(10) )
    2) create table :
    create table TEST_TABLE (
    f1 number(10),f2 number (10),f3 number (10))
    3) create procedure :
    CREATE OR REPLACE PROCEDURE testProc
    data IN test_object)
    IS
    BEGIN
    insert into TEST_TABLE( f1,f2,f3) values ( data.field1,data.field2,data.field3);
    commit;
    end;
    4) generate C++ classes along with map file for database object TEST_OBJECT by using Oracle OTT Utility
    5) C++ code :
    // include OTT generate files here and other required header files
    int main()
    int x = 0;
    int y = 0;
    int z =0;
    Environment *env = Environment::createEnvironment(Environment::DEFAULT);
    Connection* const pConn =
    env->createConnection"stmprf","stmprf","spwtrgt3nms");
    const string sqlStmt("BEGIN testProc(:1) END;");
    Statement * pStmt = pConn->createStatement(sqlStmt);
    while(1)
    TEST_OBJECT* pObj = new TEST_OBJECT();
    pObj->field1 = x++;
    pObj->field2 = y++;
    pObj->field3 = z++;
    pStmt->setObject(1,pObj);
    pStmt->executeUpdate();
    pConn->commit();
    delete pObj;
    }

Maybe you are looking for

  • Script issue with multiple lines printing

    Dear All, I'm trying to print multiple lines of my internal table in a script. But only the last line is being printed all the time in all the lines. Attached is my code.     CLEAR GS_REGUP.     LOOP AT GT_REGUP INTO GS_REGUP. * Start the Form      

  • Trouble Starting up! Help!

    So one day my Ibook G4 just crashed and I tried restarting it and nothing. It would go to the Apple logo and the little spinner would spin and just freeze. Then I would restart it from there and the screen would be black and then change to white... S

  • Importing MP4 and mp4

    I've imported a lot of raw recording from my camera that are MP4 files. However, I have a few video's that I've edited slightly in other software, that won't import, which exist as .mp4 files. If an MP4 is edited slightly, does it then save as a lowe

  • OO ABAP MATERIAL NEEDED

    pls send me OO ABAP material and some example programs.

  • Problems with the System.Windows.Forms.Timer

    Hi All, Could some one help me please? I'm having a problem using the System.Windows.Forms.Timer inside an ItemEvent, the timer event just doesn't works...give a look in my code: private System.Windows.Forms.Timer myTimer = new System.Windows.Forms.T