Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting transaction connection

Status
Not open for further replies.

rmerizalde

Programmer
May 29, 2002
2
0
0
CR
I have an application that needs to update thousands of
records. If I update the records within a while loop calling
setAttribute method of each row will take too much time.
I found a solution, use the
Code:
executeMethod
of
Code:
oracle.jbo.Transaction
. The problems is I can't pass paremeters to the statement, for example if one of the attributes requires an input stream to be updated. Now, I can cast the transaction to a
Code:
oracle.jbo.DBTransactionImpl [code] and get a connection using the method [code]getPersistendManagerConnection[code] and create a prepared statment, but this connection is not the one use by the transaction. Does anybody know how to get the transaction's connection or how to solve this problem? Note I have modified the parameters for tuning (including update batch)

Thanks
 
I already found a way to do it, using the methods <code> createStatement </code> and <code> createPreparedStatement </code> in the class <code> oracle.jbo.server.DBTransactionImpl </code>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top