I have a string of ASP code that writes a new database entry into my SQL server table. Is there a function that I can run directly after the database entry code, that can tell me if the data was successfully entered?
Eg of current code:
SQLCode = "INSERT INTO GarProductList VALUES (" & "'" & App_Name & "'" & ", " & "'" & Option_Number & "'" & ")"
response.write "SQL Code is: " & SQLCode & "<br>"
Set objRS = MyConn.Execute (SQLCode)
<< perhaps call certain function here to verify SQL table was updated? >>
If database update successful -> function should return 1
If database update fails -> function should return 0 ... or something like that. In any case, some exception response should be returned.