Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query in Code

Status
Not open for further replies.

PeasNCarrots

Programmer
Jun 22, 2004
73
US
Is it better to create a query in the query window and run it, or would it be better to create it in code and then run it?
 
It all depends on the situation. Running a query in the Query Design Window is really the same as in code but in code you are providing the user with a way to duplicate it.

Also, you should know that if a query is complex and there are a lot of records and indexes to deal with it is always better to create your query in the QDW, Save it, and Run it one time before distribution. You see the query then gets compiled by ACCESS where it optimizes the code and determines the best way to tun it effeciently. This is only done the first time it is run. Signficant differences in run time will be seen by doing this the first time it is executed at the users desktop.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top