>>In other words, if you use this syntax, the connection object is automatically closed.
>
>Ok, I see. But I'm not sure how to use it in my class. Can you elaborate a bit?
I don't know if this is applicable in your class and I'm not 100% sure the syntax will work as is.
Can you post a bit of code how you're using this method in your code right now and we'll see, if my idea can work for you or not.
If it's not broken, fix it until it is.
My Blog