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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top