Erwin Craps
Erwin.Craps at ithelps.be
Tue Nov 25 01:44:33 CST 2003
Prm is not defined in your dim statement could be one issue...
Erwin
-----Oorspronkelijk bericht-----
Van: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] Namens Stephen Bond
Verzonden: dinsdag 25 november 2003 3:54
Aan: accessd at databaseadvisors.com
Onderwerp: [AccessD] Performance issue - QueryDef
Line 3 below takes 4 seconds to execute:
1. Dim db as DAO.database, qdf as DAO.QueryDef
2. set db = Currentdb()
3. set qdf = db.QueryDefs("qryTransactionEntryFormGenerate")
4. For each prm in qdf.Parameters
5. prm.value = Eval(prm.Name)
6. Next prm
7. qdf.execute
The query is an Append query, the table being appended to is empty. The
execution time is negligible. Why should line 4 take so long??
Stephen Bond
Man will occasionally stumble over the truth, but most of the time he
will pick himself up and continue on.
-- Sir Winston Churchill