You are mixing the "literal" and "placeholder" syntax...
From the dictionary under revExecuteSQL
If you specify an arrayName rather than a list of ordinary variables, the revExecuteSQL command substitutes the corresponding element of the array for each of the placeholders in the query:
revExecuteSQL myID,"insert into mytable values(:1,:2,:1)","myArray"
Try
Code: Select all
GLOBAL gDB_DatabaseID
on mouseup
repeat with j=1 to 16
put fld j into MyArray[j]
end repeat
put "INSERT INTO superctDetails VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16)" into tSQL
revExecuteSQL gDB_DatabaseID, tSQL,"MyArray"
put the result into theResult
end mouseUp
given a (numerially indexed) array, revExecuteSQL will substitute the placeholder index with the array index. And it will do the escaping for you.