Den 2013-11-26 17:25 skrev Danny Gorton såhär:
> DbCommand objects are disposable and therefore this pattern can most
> easily be addressed with the 'using' pattern.  I see you are using it
> for your reader, you can also use it for your command objects.  Or you
> can write out your own try...finally blocks if you want (what 'using'
> actually emits).  For that matter, the code you posted could also use
> some protective logic to clean up the connection in case of catastrophy.

Thanks. I'll give it a try, and then also create a separate FbCommand 
for each operation - I currently reuse the same one.

I do have try/finally/catch to protect connection and transactions, but 
I omitted it in the post for brevity and clarity re. the normal flow of 
operations.

Regards,
Kjell

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



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to