put "INSERT INTO " & tTableName & " (" & tFields & ") VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10)" into tSQL --specifically this, :10)"
I know that because if I add a ; it complains about ');'
But I dont get it, I use the same syntax in another script and it works just fine.
Code: Select all
case movequantity < tempquantity
ask "Where are you moving it to?"
if it = "" then
BREAK
else
put it into tLOC
put tempquantity - movequantity into newQT
--Change quantity in current record
put "UPDATE yard SET quantity='" & newQT & "' WHERE id='" & tempid &"'" into tSQL
revExecuteSQL gConnectionID, tSQL
--Add new record with moved quantity
put "quantity, shape, dimension, length, grade, country, heatn, pon, supplier, loc" into tFields
put "yard" into tTableName
put "INSERT INTO " & tTableName & " (" & tFields & ") VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10)" into tSQL
revExecuteSQL gConnectionID, tSQL, "movequantity", "tempshape", "tempdimension", "templength", "tempgrade", "tempcountry", "tempheatn", "temppon", "tempsupplier", "tLOC"
if the result is a number then
answer info "Move Successfull"
else
answer error "There was a problem adding the record to the database:" & cr & the result
put "UPDATE yard SET quantity='" & tempquantity & "' WHERE id='" & tempid &"'" into tSQL
revExecuteSQL gConnectionID, tSQL
answer "Move Unsuccessfull"
end if
BREAK
end if
Here is the lines from another script that works,
Code: Select all
put "INSERT INTO " & tTableName & " (" & tFields & ") VALUES (:1, :2)" into tSQL
revExecuteSQL gConnectionID, tSQL, "tJobN", "tCertN"