Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shelley
Starting Member
3 Posts |
Posted - 2007-03-09 : 04:12:39
|
| My application is written by ASP and the database is MSSQL 2000. However, I found all the transaction in the MSSQL 2000 amoung different connection are rollback occasionally.I feel so confuse because even the transaction is rollback, it should affect one transaction only. However, I found all the transaction are rollback. What is my application problem? |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-03-09 : 04:40:11
|
| "I found all the transaction are rollback"Do you mean1) all transactions from multiple connections?2) several consecutive transactions from a single connection?For (1) I have no idea!For (2) maybe you are issuing a BEGIN TRANSACTION and not doing a COMMIT, and then either your do a ROLLBACK or you use some SQL which fails, which then inherently rolls back the current transaction.Make sure your error testing (e.g. checking the ADO Errors collection) is "tight"Kristen |
 |
|
|
rlaubert
Yak Posting Veteran
96 Posts |
Posted - 2007-03-09 : 13:19:43
|
| I believe Kristen is correct, if you share connections between multiple transactions, they are all treated as one unless explcitedly committed. Best bet is to explicitly begin and close each transaction and do it as quickly as possible.Raymond LaubertMCDBA, MCITP:Administration, MCT |
 |
|
|
shelley
Starting Member
3 Posts |
Posted - 2007-03-11 : 23:07:39
|
| Thanks for your reply. I think even I miss the commit command, it should be serveral consecutive transaction from a single connection rollback. However, the fact is all transaction in multi connection are rollback. I am so surprise when I check the data and really no idea about that.. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-03-12 : 08:27:12
|
| Do you have Implicit Transactions turned on perhaps?Kristen |
 |
|
|
shelley
Starting Member
3 Posts |
Posted - 2007-03-15 : 21:03:32
|
| Kristen,You mean if implicit transaction turn on, then all transaction in multi connection maybe rollback? How can I know whether the implicit transaction is turn on or not? Thanks. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-03-16 : 02:17:31
|
| Well, actually you WOULD know already because you would be having to issue a COMMIT to close the implicit transactions, so scratch that. |
 |
|
|
|
|
|
|
|