Chris -- Please provide the class descriptor that contains this insert-procedure element.
Ron. -----Original Message----- From: Christoph Bohl [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 1:52 PM To: [EMAIL PROTECTED] Subject: Stored Procedure / returning primary key Gurus, I try to use a stored procedure to insert a table. This works perfectly. The stored procedure does correctly return the values that get inserted into the database. Unfortunately, the object I am inserting does not change after the insert (toString() before and after). Can you please point out what I am doing wrong? Any help is greatly appreciated! The repository_user.xml: <insert-procedure name="du$zollpartner_t_b.ins"> <runtime-argument field-ref="ztb_id" return="true"/> <runtime-argument field-ref="ztb_verband" return="true"/> <runtime-argument field-ref="ztb_rechtsform" return="true"/> <runtime-argument field-ref="ztb_anmeldedatum" return="true"/> <runtime-argument field-ref="ztb_unterlagenzustelldatum" return="true"/> <runtime-argument field-ref="ztb_gueltigv" return="true"/> <runtime-argument field-ref="ztb_gueltigb" return="true"/> <runtime-argument field-ref="ztb_erstuser" return="true"/> <runtime-argument field-ref="ztb_erstdat" return="true"/> <runtime-argument field-ref="ztb_mutuser" return="true"/> <runtime-argument field-ref="ztb_mutdat" return="true"/> <runtime-argument field-ref="ztb_zpa_id" return="true"/> </insert-procedure> The Java code tested (Persistence Broker API): PersistenceBroker broker = null; try { broker = PersistenceBrokerFactory.defaultPersistenceBroker(); broker.beginTransaction(); broker.store(ztb); broker.commitTransaction(); } finally { if (broker != null) broker.close(); } ODMG API: // Implementation odmg = OJB.getInstance(); // Database db = odmg.newDatabase(); // try { // // db.open("TABI", Database.OPEN_READ_WRITE); // } catch (Exception e) { // System.out.println(e.toString()); // } // // TransactionExt tx = (TransactionExt) odmg.newTransaction(); // System.out.println("vor insertf: " + ztb.toString()); // // tx.begin(); // tx.markDirty(ztb); // tx.commit(); Thank you very much!! Cheers, Chris -- "When you were born, you were crying and everyone around you was smiling. Live your life so that when you die, you�re the one who is smiling and everyone around you is crying." --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
