Subject | Re: [firebird-support] Working with transactions |
---|---|
Author | Mark Rotteveel |
Post date | 2012-04-04T07:14:49Z |
On Tue, 3 Apr 2012 16:20:02 +0100, Russell Rose <russell@...>
wrote:
mailinglist.
Mark
wrote:
> I was wondering if there was any way to determine if there is a pendinghave
> transaction outstanding. I have a single connection to a database and
> something like the following code:the
>
> 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 localThis question is probably better suited for the Firebird .NET provider
> 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.
mailinglist.
Mark