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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top