I have this which returns 0
Code: Select all
command mlteSales_CreateSales pRecordA
local tSqlQuery, tSqlParamsA, tRowid
--
sqlquery_create "sales", pRecordA
put the result into theError
put it into theAffectedRows
-- now get the brand new id
dbconn_lastInsertedID
return tRowid
end mlteSales_CreateSales