D
Doug
Hi,
I've read through some posts on this error but none seem to exemplify
what I had happen to me and wanted to see if anyone else has seen this.
I know a lot of people like to see code, it's going to be hard to show
you code examples as I'm using a lot of our common code (which is
large) and some of that wraps Microsoft's application blocks. I'll try
to explain it as best I can though:
Basically, I have an app that is doing some writing to the database
(don't they all? ) and is using our common data code for committing
and rolling back transactions. The data code has a class that I'm
using that keeps a connection object open.
In testing, my app took a very short period of time to run - but in
production it is taking a much longer time (another common problem I'm
sure). However, it took so long that I ended up getting this error:
"This SqlTransaction has completed; it is no longer usable."
My thought is that since I kept a connection object open and that the
application took waaaayyy longer to run through than it should (over 8
hours), that the connection was lost and that is why I got this error
because it couldn't use a transaction on a closed connection. Does
that sound like a reasonable explanation of why I might get an error
like this?
Note: By the way, I am fixing my performance problem - it's outside
the scope of this question though.
I've read through some posts on this error but none seem to exemplify
what I had happen to me and wanted to see if anyone else has seen this.
I know a lot of people like to see code, it's going to be hard to show
you code examples as I'm using a lot of our common code (which is
large) and some of that wraps Microsoft's application blocks. I'll try
to explain it as best I can though:
Basically, I have an app that is doing some writing to the database
(don't they all? ) and is using our common data code for committing
and rolling back transactions. The data code has a class that I'm
using that keeps a connection object open.
In testing, my app took a very short period of time to run - but in
production it is taking a much longer time (another common problem I'm
sure). However, it took so long that I ended up getting this error:
"This SqlTransaction has completed; it is no longer usable."
My thought is that since I kept a connection object open and that the
application took waaaayyy longer to run through than it should (over 8
hours), that the connection was lost and that is why I got this error
because it couldn't use a transaction on a closed connection. Does
that sound like a reasonable explanation of why I might get an error
like this?
Note: By the way, I am fixing my performance problem - it's outside
the scope of this question though.