Using .Execute Method

  • Thread starter Thread starter David C. Holley
  • Start date Start date
D

David C. Holley

When the .Execute method of a database object fails, does the regular
error object grab any error that occurrs or is it captured elsewhere? I
vaguely recall that there's a property that captures the error in
addition to the regular error object.
 
If you use the dbFailOnError switch, the failed execute generates an error
that you can trap with your regular error handling, e.g.:
dbEngine(0)(0).Execute strSql, dbFailOnError

If you do not use the switch, no error is generated.

Even if you do use the switch, the changes that were appended/updated/delete
up to the error still stand, unless you wrap the operation in a transaction.
 
When the .Execute method of a database object fails, does the regular
error object grab any error that occurrs or is it captured elsewhere? I
vaguely recall that there's a property that captures the error in
addition to the regular error object.

Use .Execute with dbFailOnError: db.Execute MySQL, dbFailOnError
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Back
Top