SQL Return Code

ssmith001

Registered User.
Local time
Today, 11:34
Joined
Jun 6, 2006
Messages
29
Is there a way that you can capture a return code after you issue an Insert statement using SQL?

I have a script that does numerous inserts into a table and I want a way to make sure there was no issues with the insert.
 
If you use CurrentDb.Execute strSQL, dbFailOnError your error handling will catch any problems.

Edit: You could also examine the RecordsAffected property if you desire.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom