in reply to Sybperl - Problem with Handling Transactions with Commit and Rollback
I don't think your problem is with Sybase::DBlib, which is just an interface to DB-Library, so much as in your transaction management logic.
It's been about a year since I worked with Transact-SQL, but I think the error in your "query 3" is causing the transaction to roll back; therefore, the updates following it are not done as part of the original transaction, and thus the rollback has no effect. Check the transactions reference in the Sybase manuals to see if your error will cause automatic rollback.
To get around the problem, you may want to check your $status variable before even initiating the update. Hard to say without knowing the structure of the rest of your code.
|
|---|