On 27-11-2013 09:28, Kjell Rilbe wrote:
>> The problem is that you did not close the command, which means it is
>> still prepared, which marks the table as used. Now when you close the
>> connection, the command will be closed as well.
>
> I looked for an Unprepare method, and didn't find it. Thought "oh well".
> Didn't think to look for Close. I'll give that a try.

There is no concept of 'unprepare' in Firebird. Either a statement 
handle is prepared with a different statement, or the statement handle 
is closed. Both will effectively unprepare the old statement, but it is 
not entirely the same concept ;)

>> So the solution is to wrap the command (and everything that uses the
>> command) in a using block as well.
>
> Or call cmd.Close explicitly?

Sure, but personally I prefer using, because you don't have to add 
boiler plate to ensure the object gets closed and disposed when 
exceptions occur.

-- 
Mark Rotteveel

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&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