Hello Carlos,
Sorry to bother you again. I've spent the whole day trying to pin down
a problem I had never experienced with the 1.7 provider and that I have
now with the latest 2.1 from CVS.
I cannot provide you with a demo code for now, as it is very difficult
to get to the point where the problem arises, but I have a detailed
explanation of what happens :
(1) I create a transaction, associate it with a SELECT command, which
is used to fill a DataSet through a DataAdapter, then I commit my
transaction.
(2) I modify a few rows in my DataSet/DataTable.
(3) I create a transaction, associate it with my original SELECT
command, then I call Update on the adapter. This automatically
calls your FbCommandBuilder, which goes on and creates an
InsertCommand based on the same transaction as the SELECT
command.
(4) I commit the transaction. This will clear the transaction in
the InsertCommand (FbTransaction.Commit calls UpdateTransaction,
which calls FbConnectionInternal.TransactionUpdated and sets
the FbCommand.Transaction to null).
I expected this, fine...
(5) I modify more rows in my DataSet/DataTable.
(6) I create a transaction, associate it with my original SELECT
command, then I call Update on the adapter. However, at this
point, the InsertCommand already exists; it is not re-created
and therefore, its Transaction stays null.
Later on, Update tries to execute the InsertCommand but this
generates an exception, as there is no Transaction associated
with the InsertCommand.
So my question is: how can I circumvent this problem ? Do I need
to re-associate my transaction with the InsertCommand myself ? If
yes, I don't really understand how I can do this, as I only have
access to the DataAdapter. And DataAdapter.InsertCommand is null;
I guess I should keep track of the FbCommandBuilder or do I have
a means of finding the command builder based on an adapter ?
I hope you can help me on this one too ;-)
Pierre
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider