Page 1 of 1

How can I detect if the statement is a select or non select?

Posted: 06.03.2013, 16:54
by snorkel12068
Hi,
Is there a way in Zeos 7 to detect if the statement is a select or non select?
reason I ask is I am writing a small query editor and I would like to be able to use a single button to execute whatever the user selects.

I am running Lazarus 1.0.6 and FPC 2.6.2 and latest SVN version of Zeos

Thanks,

Snorkel

Posted: 10.03.2013, 22:00
by mdaems
Use Open and intercept the 'no dataset' error?
Search for 'select' in the sql statement?

Inside some dbc drivers we use the database client library to check this. But then you're already passing the query to the database library, something you probabl don't want to do yourself when using a component set as zeoslib that tries to be as db independent as possible.

Mark