Subject | How do I issue SET TRANSACTION LOCK TIMEOUT from ADO.Net? |
---|---|
Author | Bryan Pendleton |
Post date | 2007-08-11T23:03:38Z |
Hi,
I tried to issue the statement
SET TRANSACTION LOCK TIMEOUT 5
by calling FbCommand.ExecuteNonQuery(), and I received the error:
invalid transaction handle (expecting explicit transaction start)
What does this error mean?
Immediately prior to calling ExecuteNonQuery, I set the Transaction
field of my Statement object:
stmt.Transaction = cn.BeginTransaction(IsolationLevel.ReadCommitted);
This seems to work fine for all other SQL statements I've tried,
but causes an error on the SET TRANSACTION statement.
Does this statement need to be handled differently?
thanks,
bryan
I tried to issue the statement
SET TRANSACTION LOCK TIMEOUT 5
by calling FbCommand.ExecuteNonQuery(), and I received the error:
invalid transaction handle (expecting explicit transaction start)
What does this error mean?
Immediately prior to calling ExecuteNonQuery, I set the Transaction
field of my Statement object:
stmt.Transaction = cn.BeginTransaction(IsolationLevel.ReadCommitted);
This seems to work fine for all other SQL statements I've tried,
but causes an error on the SET TRANSACTION statement.
Does this statement need to be handled differently?
thanks,
bryan