Den 2011-08-15 16:38 skrev Kjell Rilbe såhär:
> Hi,
>
> Please regard the following code snippet, from my app:
>
>
> FbTransaction trans = cmdData.Connection.BeginTransaction();
> try
> {
>     cmdData.Transaction = trans;  // (1)
>     cmdÄgare.Transaction = trans; // (2)
>     cmdIdn.Transaction = trans;   // (3)
> ...
> }
>
[snip]
> But when executing (2), cmdData.Transaction becomes == null again, while
> cmdÄgare.Transaction becomes == trans.
>
> Then, again, when executing (3) cmdÄgare.Transaction becomes == null and
> cmdIdn.Transaction becomes == trans.

I tried duplicating the three lines with assignments:

cmdData.Transaction = trans;
cmdÄgare.Transaction = trans;
cmdIdn.Transaction = trans;
cmdData.Transaction = trans;
cmdÄgare.Transaction = trans;
cmdIdn.Transaction = trans;

Now it works!

This, on the other hand, does NOT work:

cmdData.Transaction = trans;
cmdData.Transaction = trans;
cmdÄgare.Transaction = trans;
cmdÄgare.Transaction = trans;
cmdIdn.Transaction = trans;
cmdIdn.Transaction = trans;

Tried this:

cmdData.Transaction = trans;
cmdÄgare.Transaction = trans;
cmdData.Transaction = trans;
cmdIdn.Transaction = trans;

This looks alright after executing the first three, but when I execute 
the fourth line, both cmdData and cmdÄgare lose thier Transaction 
(becomes null).

Weird!

Kjell
-- 
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kj...@datadia.se
Telefon: 08-761 06 55
Mobil: 0733-44 24 64


------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to