Hi,
I want to check the success/failure of an INSERT INTO statement. I've checked 'ERR' but this does not pick up the status of the SQL statement itself. I have done this against other databases using different languages, but cannot find the code or reserved word to check this.
Below is the INSERT code. I want to check the return status and handle errors appropriately.
dbs.Execute "INSERT INTO Inventory" _
& "(bondnumber, prefixbond, numbond, agency, searchstatus)" _
& "VALUES (" _
& "'" & Me.tb_addfrom.Value & "'," _
& "'" & ls_prefix & "'," _
& ls_numbond & "," _
& gs_agency & "," _
& "'" & "INVENTORIED" & "'" & "
;"
Thanks in advance for any advice!
Kathy
I want to check the success/failure of an INSERT INTO statement. I've checked 'ERR' but this does not pick up the status of the SQL statement itself. I have done this against other databases using different languages, but cannot find the code or reserved word to check this.
Below is the INSERT code. I want to check the return status and handle errors appropriately.
dbs.Execute "INSERT INTO Inventory" _
& "(bondnumber, prefixbond, numbond, agency, searchstatus)" _
& "VALUES (" _
& "'" & Me.tb_addfrom.Value & "'," _
& "'" & ls_prefix & "'," _
& ls_numbond & "," _
& gs_agency & "," _
& "'" & "INVENTORIED" & "'" & "
Thanks in advance for any advice!
Kathy