Check SQL Query - if correct, no syntax error, procee some task, if error found, stop

  • Thread starter Thread starter AAA
  • Start date Start date
A

AAA

Hi,

I have a textbox which allow user to enter their SQL query.
So that query will be dynamic each time cos it is based on user input.

how could I write a code to detect if the input SQL query is ok, no syntax
error ?

if SQL query = ok then
TO TASK
else
STOP
endif
 
If you decide to run the query, consider wrapping it in a transaction that
you will be rolling back if executed successfully- to avoid changing the
data
 
Back
Top