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.

 All Forums
 Development Tools
 Other Development Tools
 Classic ASP and Sql Server - Transactions

Author  Topic 

sw26p2
Starting Member

8 Posts

Posted - 2010-11-29 : 09:22:53
I have an asp script that is being run asynchronously. The script can take awhile to run, and we didn't want to have the user's screen tied up while it is running. Sometimes the script will stop running before completing. I added "Transaction=Required" to the first line of the asp script so it traps the abort and writes a record to a text file.

The problem is that the script is now getting SQL Server errors.

The asp script is using stored procedures to read and update data in a SQL Server database (Version 8).

The code is getting several errors:
1. "Transaction context in use by another session"
2. "Import of MSDTC transaction failed: Result Code = 0x8004d00e"

The asp script does a database connection, then has some nested cursors, and is updating the database within the cursors.

I added "Provider=SQLOLEDB.1;" to my connect string

There are no "Begin Transaction" or "Commit" statements in any of the sql Stored Procedures.

I have looked for examples of using "Transaction=Required" with Sql Server stored procedures, but have not been able to find anything.

Please let me know if you need more information.
Thank you for your help
   

- Advertisement -