Subject | C# check active transaction of a connection |
---|---|
Author | prokenic |
Post date | 2004-10-24T11:54:54Z |
Beginner...
I used to use the below method to do that
private bool CheckHaveActiveTransaction()
{
try{
Connection.BeginTransaction();
Connection.Commit();
}catch()
{
return true;
}
}
This method takes time to check for a remote db server connecting
over TCP/IP on Internet.
Any better method?
I used to use the below method to do that
private bool CheckHaveActiveTransaction()
{
try{
Connection.BeginTransaction();
Connection.Commit();
}catch()
{
return true;
}
}
This method takes time to check for a remote db server connecting
over TCP/IP on Internet.
Any better method?