Page 1 of 1

TMyQuery - SQLINSERT

Posted: Mon 28 Apr 2008 18:01
by lucasbr
Hi,

which SQL commands can i use in SQLINSERT inside of TMYQuery?

Can I use

select max(ordnumber)+1 into @number from order;
insert into order
(number, .......)
values
((select @number), ........)

Can I use TRANSACTION?

Posted: Tue 29 Apr 2008 09:37
by Antaeus
Yes you can. You can also use calls to stored procedures in SQLInsert and other properties like this.

Note that the SQLInsert property should hold a command to insert a new record each time you call Insert/Post methods. So you should take care in your script for the provided values to be handled correctly.
If your script must modify either zero or more than one records, you should set the StrictUpdate option of your query to False.