Queries by Design and Store or Progammatically

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

Guest

I have this battle running with other developers. Is it better to design and
store queries and then call them by program code? Or Is it Better to create
an SQL statement by Code then executing. My feeling is a stored named query
is more efficient, since Access optimizes the query when compiled. Please
post opinoins.
 
From what I've read, it is more efficient to store the query than to run the
query via vba code; however, I'm not an expert at doing stored procedures
and using variables in them, so I usually resort to vba code when i need to
match input data with a variable in the query.

Linda
 
In theory, it may be so but in practice, I doubt if you are going to see any
difference between the 2 methods. Compiling / checking the SQL syntax for
average SQL takes a tiny fraction of a section (probably in the order of
milli-second).
 
Back
Top