Try to prepare the statement, which will check the syntax but won't run it.
Chris Fink wrote:
I am using the Microsoft.Data.Odbc class to submit an SQL to TeraData using |
the commandText property (SQL is stored in a string locally). Is there a way
to perform validation on the SQL syntax prior to submission to the DB? In
our environment, we submit dozens of SQL statements sequentially and I am
trying to eliminate bad SQL syntax from bombing the execution.
Any help is appreciated!