Taking a closer look at the code, you are creating a FbCommand
and a transaction that you aren't actually using. Now when you execute the FbDataAdapter
, the Firebird .NET provider notices the connection is already using a transaction and throws the exception.
You need to change your code either to:
FbTransaction transaction = Fbconnection.BeginTransaction();
FbCommand command = new FbCommand(Fbsql, Fbconnection, transaction);
FbDataAdapter da = new FbDataAdapter(command);
Or without using an explicit separate transaction:
FbDataAdapter da = new FbDataAdapter(Fbsql, Fbconnection);
BTW: I'd strongly suggest you apply using
to objects that are disposable, to be sure resources are cleaned up properly.