Sql -> Any tuto ?

Gary Willoughby dev at nomad.so
Fri Oct 25 01:07:01 PDT 2013


On Saturday, 10 August 2013 at 18:28:31 UTC, H. S. Teoh wrote:
> In that case, it should be written like this:
>
> 	...
> 	command.prepare();
> 	scope(exit) command.releaseStatement();
>
> 	ulong rowsAffected;
> 	foreach ...
>
> This is exactly the kind of situation scope guards are designed 
> for. So
> use them! :-)
>
>
> T

It's sometimes not that simple if you are within try/catch blocks 
or re-using the command for other queries.


More information about the Digitalmars-d-learn mailing list