Page 1 of 1

TMSConnection.StartTransaction error 'Cannot create new connection because in manual or distributed transaction mode'

Posted: Sun 30 Mar 2008 12:51
by wnfwnf
Hi,
I faced a proble when start a transaction(TMSConnection.StartTransaction), it show the error message 'Cannot create new connection because in manual or distributed transaction mode', how to solve it,

it's emergency, please tell the soluction.

thank very much!

1. a program include TMSConnection and TMSQuery, TMSQuery component 's CachedUpdates is true,
2.Open the TMSQuery component
3. Edit the record
4. start a transaction, then show the error message,

Posted: Mon 31 Mar 2008 07:57
by Antaeus
Most likely you are trying to start the transaction when there is an underfetched dataset (FetchAll is set to False) within the connection. You should either start the transaction before opening your dataset or force fetch before starting the transaction. You can force fetch by setting FetchAll to True.

Posted: Thu 20 Oct 2011 08:53
by upscene
Antaeus wrote:Most likely you are trying to start the transaction when there is an underfetched dataset (FetchAll is set to False) within the connection. You should either start the transaction before opening your dataset or force fetch before starting the transaction. You can force fetch by setting FetchAll to True.
I got this error as well, but I AM starting a transaction before doing .Open, nevertheless, when editing data while FetchAll is False and not all rows are fetched, I get this error.

Using SQL Server 7 or 2005 makes no difference.

Got a clue?

Posted: Thu 20 Oct 2011 15:59
by Dimon
To solve the problem set the TMSConnection.Options.MultipleActiveResultSets property to True.

Posted: Thu 20 Oct 2011 17:04
by upscene
I've tried that, but that messed up lots of other things with transaction errors.

Besides, won't this work for SQL Server 2005 and up only?

Posted: Fri 21 Oct 2011 13:08
by Dimon
These problems are connected with MARS, but not SDAC, and we can't influence it. You can find information about MARS and transactions here: http://blogs.msdn.com/b/cbiyikoglu/arch ... -3983.aspx