Subject Re: [firebird-support] Working with transactions
Author Mark Rotteveel
On Tue, 3 Apr 2012 16:20:02 +0100, Russell Rose <russell@...>
> I was wondering if there was any way to determine if there is a pending
> transaction outstanding. I have a single connection to a database and
> something like the following code:
> FbConnection conn;
> FBCommand cmd = conn.CreateCommand();;
> cmd.Transaction = conn.BeginTransaction();
> I then call another generic routine which starts up a new command:
> Cmd2 = conn.CreateCommand();
> I get the following error:
> Execute requires the Command object to have a Transaction object when
> Connection object assigned to the command is in a pending local
> transaction. The Transaction property of the Command has not been
> initialized.
> The 2nd routine is sometimes called when there is a pending transaction
> and sometimes not.

This question is probably better suited for the Firebird .NET provider