Home > Back-end >  Adoqry doesn't recognize the GO command
Adoqry doesn't recognize the GO command

Time:11-16

I wrote a modified multiple views of the SQL script, with each script go separate, then directly into adoqry, error as a result, does not recognize the go command; Remove go, can't batch execution modify multiple views of the SQL script, consult how to solve?

CodePudding user response:

Write a stored procedure, and then ado calls the stored procedure

CodePudding user response:

Call osql to perform

CodePudding user response:

To carry out calling ado controls the AdoStoredProc controls

CodePudding user response:

Methods:
Use stringlist load SQL file, read line by line,
=GO, adoqry execution, empty adoqry. SQL
<> GO, after reading the writing adoqry. SQL

CodePudding user response:

Points to perform adoqry ExecSQL many times

CodePudding user response:

My SQL haven't tried this problem

Such as: batch to create tables and views are not error

The reason should be on the SQL, try to don't refer to the SQL database export, write their own, remove the those irrelevant words
Such as: DBO aTable, aTable instead

CodePudding user response:

1, starting the transaction processing functions on the ADO connection control

2, in a transaction, use the query control respectively carry out the update of different views,

3, the transaction is committed or rolled back when an error occurs,

CodePudding user response:

Replace the GO try with a semicolon

CodePudding user response:

Itself is not supported, because GO out of the things, that are commonly need to use software in the design of automatic updates, I usually use SQLCompare automatically generate a file, and then use adoquery execution
  • Related