vinod_pv Posted March 16, 2007 Share Posted March 16, 2007 I have a PHP Class which handles all Oracle inserts, deletes and updates. I use oci_execute with OCI_DEFAULT option which will not autocommit the transaction. I use this class whereever I need database operations. My problem is - If my caller program calls oci_execute (which is in my class) more than once, it automatically commits the previous transaction without executing oci_commit. It works fine If I call the oci_execute with OCI_DEFAULT from the same script. But the problem occurs when I call oci_execute with OCI_DEFAULT from a calling script and leaves without commit. In such cases subsequent call automatically commits the previous transaction. Hope somebody helps me. Quote Link to comment https://forums.phpfreaks.com/topic/42968-transaction-handling-problem-using-oci_execute-with-oci_default/ Share on other sites More sharing options...
gluck Posted April 13, 2007 Share Posted April 13, 2007 Is auto commit on? Quote Link to comment https://forums.phpfreaks.com/topic/42968-transaction-handling-problem-using-oci_execute-with-oci_default/#findComment-228617 Share on other sites More sharing options...
Feenix566 Posted July 3, 2007 Share Posted July 3, 2007 I suspect that your class and your calling script are both using the same Oracle connection. Try having your class open up its own connection to Oracle, and keep it private. That way only the class will be able to commit its own transactions. Quote Link to comment https://forums.phpfreaks.com/topic/42968-transaction-handling-problem-using-oci_execute-with-oci_default/#findComment-288880 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.