I have code that connects to a Sybase database and sets AutoCommit to 0. Subsequent statements all make that assumption and call explicit commits and rollbacks as needed.
One of those statements was a stored proc that turned out to be useful when accessed outside my Perl code. Since the transaction code in the Perl would not be accessed, we shoved a begin tran, commit and rollbacks into the stored proc. When the stored proc detects an error condition, my Perl code gets this: Failed to obtain Portia Operator: DBD::Sybase::st execute failed: Server message number=99999 severity=16 state=1 line=92 server=A2S1 procedure=am_batch_ctrl_get_oper_out text=am_batch_ctrl_get_oper_out - no process found for BATCHER, yet logged_on is non-zero in opf Server message number=266 severity=10 state=1 line=12 server=A2S1 procedure=am_batch_ctrl_get_oper text=Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRAN is missing. Previous count = 1, Current count = 0. at /am/clrpt/lib/site_perl/5.6.1/CLRPT.pm line 1361 Now, the first server message is expected. The second is not. I am wondering if we could get rid of the second message by setting AutoCommit = 1 before the prepare for the stored proc and then setting it back to zero right after so as not to disturb all the other statements. What is the scope of an AutoCommit setting? Is the current value in the $dbh accessed at execution time or is the value copied to the $sth at prepare time and used as such at execution time, regardless of what the $dbh value is set to? Thanks. -- Matthew O. Persico