Results 1 to 5 of 5
Apr 30, 2005, 21:46 #1
- Join Date
- Jun 2001
- 0 Post(s)
- 0 Thread(s)
Function to confirm successful database entry?
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.