Saga
3/29/2007 7:20:00 PM
Hi all,
I am trying to understand the consecuences of the error "Cannot start more transactions on this
session".
I have a table with a field defined as Numeric 5.3
My code inadventanly attempts to insert a record where the value for this field is 8 million. Since
this value is
too large for the Numeric 5.3 field it causes SQL Server (2000) to generate the following error:
-2147217833 [Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic overflow error
converting numeric to data type numeric.
The error is trapped accordingly and processing continues, but for every subsequent INSERT, SQL
Server
generates the above mentioned error:
-2147168237 Cannot start more transactions on this session.
Googling this error tells me that this happens because an attempt is made to start more than one
transaction
when using OLEDB. I realize that every statement is an implied transction, could this be happening
because
the overflow error left a transaction uncommited? Upon consideration, I am beginning to doubt that
it refers
to this kind of transaction.
At this time the only way to "fix" this problem is to exit the application and re-enter it (in
effect closing the DB
connection and opening it again).
Is there any way to deal with this error wothout having to close/open the connection from within the
VB6 (SP5)
application? Of course I will correct theproblem with the invalid data, but I would like to know
more about the
"Cannot start more transactions on this session." error.
Thank you for your assistance and time.
Regards
Saga
--