Running query (speed issue)
Hi,
I have the following question, which way of running query is in general faster or best to use:
--------------------------------------------------
DoCmd.SetWarnings False
DoCmd.RunSQL ("[SQL STATEMENT]")
DoCmd.SetWarnings True
--------------------------------------------------
OR
--------------------------------------------------
Set db = CurrentDb
mySQL = "[SQL STATEMENT]"
Set qry = db.CreateQueryDef("", mySQL)
qry.Execute
qry.Close
db.Close
--------------------------------------------------
The second question is: Are they both working when I transfer my back-end to SQL Server 2000?
My third question is: Is DLookup the fastest way to look for a record in a table or are there other and faster ways to do it?
Thanks a lot for your answers.
Hi,
I have the following question, which way of running query is in general faster or best to use:
--------------------------------------------------
DoCmd.SetWarnings False
DoCmd.RunSQL ("[SQL STATEMENT]")
DoCmd.SetWarnings True
--------------------------------------------------
OR
--------------------------------------------------
Set db = CurrentDb
mySQL = "[SQL STATEMENT]"
Set qry = db.CreateQueryDef("", mySQL)
qry.Execute
qry.Close
db.Close
--------------------------------------------------
The second question is: Are they both working when I transfer my back-end to SQL Server 2000?
My third question is: Is DLookup the fastest way to look for a record in a table or are there other and faster ways to do it?
Thanks a lot for your answers.