Last Inserted ID
Posted: Mon Oct 10, 2016 11:01 am
Please can I have the right syntax to use for retrieving the last inserted id after creating a record?
I have this which returns 0
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