You can parse the query, extract table name and try to open it with USE command before query is run.
>I have an application where I want to allow users to enter SQL statements from the web, and then a VFP server application executes these SQLs.
>
>That works all fine, UNLESS someone types in a SQL statement where the FROM ALIAS does not exist, e.g.
>
>SELECT * FROM TRANACT
>
>instead of
>
>SELECT * FROM TRANSACT
>
>and the TRANSACT table does not exist. Then my Server program stops serving because it comes up with the "OPEN FILE" dialog, and the server hangs, because nobody is sitting at it to close that dialog.
>
>Is there some way to SUPPRESS the OPEN dialog when an invalid FROM Alias is specified in the SELECT command?
>
>I figure there must be something better than KEYBOARD "{ESC}"
>
--sb--