Page 1 of 1

ODACv6.5 OraSession how to use BeginTrans like adoconnection

Posted: Wed 24 Dec 2008 03:09
by jansonwu
ODACv6.5 TOraSession how to use BeginTrans event like adoconnection?

TOraSession have not
"OraSession1.BeginTrans;OraSession1.CommitTrans;OraSession1.RollbackTrans; "?

Posted: Wed 24 Dec 2008 08:27
by Plash
TOraSession has the StartTransaction, Commit, and Rollback methods. But it has no corresponding events.

You can manually call your code that should be executed after a transaction is started. For example:

Code: Select all

OraSession.StartTransaction;
DoOnStartTransaction; // this is your procedure that is executed after a transaction is started