I've got a class (a component), which executes a stored procedure (through a command object). The component "Requires Transaction" and it's called from "Supports Transaction" component . That stored procedure contains some SQL commands (INSERT/UPDATE). When the stored procedure contains no error, every SQL command is performed. When some SQL command is incorrect ísyntax/bad column name/...), the correct commands are performed and incorrect command raises an error ONLY and terminates procedure's executing. Changing from executed commands REMAIN!!!
Well, I expected, that my reaction - SetAbort() - on any exception in my class invoked by any error in the stored procedure (actually, in any SQL batch) causes ROLLBACK!
PS: A connection object is opened inside the component which "Requires Transaction".
PS: WIN 2000 Professional (SP2), SQL Server Desktop Engine 2000, DTC is running, tested on ONE machine (fault?)
PPS: Both Rollback or Commit (after Begin, of course) works...
Thanks a lot!
hawran
Well, I expected, that my reaction - SetAbort() - on any exception in my class invoked by any error in the stored procedure (actually, in any SQL batch) causes ROLLBACK!
PS: A connection object is opened inside the component which "Requires Transaction".
PS: WIN 2000 Professional (SP2), SQL Server Desktop Engine 2000, DTC is running, tested on ONE machine (fault?)
PPS: Both Rollback or Commit (after Begin, of course) works...
Thanks a lot!
hawran