GetLastInsertId
Brought to you by:
papillon_
Small patch that adds a new command to retrieve the
last value created by an INSERT into a table with an
auto incremented field.
aps_include should have a new function as well.
int SQLInsertReturnId(string sInsertQuery)
{
SetLocalString(GetModule(),
"NWNX!ODBC!INSERT_RET_ID", sInsertQuery);
return StringToInt(GetLocalString(GetModule(),
"NWNX!ODBC!INSERT_RET_ID"));
}
Patch