Page 1 of 1
Help should clarify capabilities of TMyCommand vs TMyScript for multiple statements
Posted: Sat 23 Jan 2021 20:57
by davidmarcus
The Help for the TMyScript Class and the TMyCommand Class give the impression that TMyCommand can only execute one SQL statement at a time. However, the code for TMyCommand uses the CLIENT_MULTI_STATEMENTS flag, so TMyCommand can handle multiple statements separated by semicolons.
Re: Help should clarify capabilities of TMyCommand vs TMyScript for multiple statements
Posted: Tue 26 Jan 2021 14:39
by ViktorV
As described in MyDAC documentation (
https://www.devart.com/mydac/docs/devar ... ommand.htm), you can use TMyCommand to access database server using SQL statements. This component allows you to execute several comma-delimited statements in a single run.
TMyScript (
https://www.devart.com/mydac/docs/devar ... script.htm) is a component for executing several SQL statements one by one, and in case of an error in one of the statements, it will continue execution of other statements
Note that you can use dbMonitor to find out what information is sent to the server, as well as when it is sent.
You can learn about using Batch Operations in our products on our blog:
https://blog.devart.com/using-batch-ope ... nents.html