Execute multiple MySQL commands

Bob Sneidar bobsneidar at iotecdigital.com
Thu Feb 8 10:48:11 EST 2018


I know where! The Dictionary:


SQLStatement	string	
A string in Structured Query Language. (Do not include a semicolon at the end of the SQLStatement.) >Note: Some database systems, such as Oracle, are capable of handling a multiple-line SQL statement.

Bob S


> On Feb 8, 2018, at 07:34 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> I thought I read somewhere that the LC API does not support multiple statements? 
> 
> Bob S
> 
> 
>> On Feb 8, 2018, at 02:24 , Ludovic THEBAULT via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> Hello,
>> 
>> I’ve an « syntax error » as result if i want to execute multiple MySQL commands, even with transactions.
>> 
>> It is normal ? If i execute one command at time, it’s work.
>> 
>> Thanks !
>> 
>> 
>> 
>> Here a sample script :
>> 
>> revExecuteSQL tDatabaseID,"BEGIN TRANSACTION »
>> 
>> put "INSERT INTO savemyTable (column1) VALUES (1)  & ";" & cr into tSQL
>> 
>> put "DELETE FROM myTable WHERE id = " & id & ";" & cr after tSQL
>> 
>> revExecuteSQL tDatabaseID, tSQL
>> 
>> if the result is not an integer then answer the result
>> 
>> else …// COMMIT
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list