Transaction problem for ADO with SQL server

Transaction problem for ADO with SQL server

Post by Benjami » Wed, 14 Jan 2004 19:45:33


Hello!

When I use 2 TADOConnection in a application

adoconnection1.begintrans;
adodataset1.connection := adoconnection1;
adodataset1.commandtext := 'select * from t1';
adodataset1.open;
adodataset1.edit;
adodataset1.fields[0].value := 1;
adodataset1.post;

adodataset2.connection := adoconnection2;
adodataset2.commandtext := 'select * from t1';
adodataset2.open;

/******** timeout error occur **********/

How to solve this problem?
I also try all the Isolationlevel and mode of the TADOConnection.

Benjamin.
 
 
 

Transaction problem for ADO with SQL server

Post by Kevin Frev » Wed, 14 Jan 2004 22:53:17

Benjamin,

Just curious, why do explicity start transactions in code? Why are you
using two connection components?

Not really related to your question, but good reading on the basics...
http://www.yqcomputer.com/ ,1410,28160,00.html
http://www.yqcomputer.com/ ,1410,22571,00.html
http://www.yqcomputer.com/ ,1410,20847,00.html
http://www.yqcomputer.com/
http://www.yqcomputer.com/ ,1410,27790,00.htm

Good luck,
krf