RunSQL vs Excute

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a better time to use one versus the other? Are there any performence
gains in defined situations?
 
Plumdodge said:
Is there a better time to use one versus the other? Are there any performence
gains in defined situations?

None that I'm aware of. I always use the Execute method because it allows
you to trap errors, plus doesn't pop up the warnings.
 
Is there a better time to use one versus the other? Are there any
performence gains in defined situations?

I've never ever found a reason to use the DoCmd.RunSQL.

The difference would be that the DoCmd object is part of the GUI, and
therefore uses the expression evaluator, so that you can insert inot the
SQL references to form controls, VBA routines, and so on. But then again,
there are nearly always better ways of doing the same so I still don't
use it.

As Douglas says, the availability of the dbFailOnError argument is
another biggie.

Hope that helps


Tim F
 

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