From: Danny G. <da...@ab...> - 2013-11-26 16:38:37
|
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. Danny Gorton II Co-founder Absolute Power and Control, LLC www.absolutepowerandcontrol.com On 11/26/2013 11:04 AM, Kjell Rilbe wrote: > > Den 2013-11-26 15:46 skrev Jiri Cincura såhär: >> How the connection string looks like? > > Please refer to the thread in firebird-support about this issue: "Object > in use... wtf???" > > I got a couple of replies there, from Ann Harrison among others. I > probably need to make sure somehow that the FbCommand is disposed so > that it releases/closes the statement in FB. > > How...? > > Kjell > |