For a select statement you can inspect Eof. For other statements the query is not really "open". The underlying cursor may be open, but that should not really be relevant to your application logic.
------------------
Marco Kalter
Allround Automations