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
 
Back
Top