|
|||
|
hbinc <j.van.gils@hccnet.nl> wrote in
news:29746a09-2bb8-45d6-9afc-70eae6aa6520@t2g2000yqn.googlegroups.com: >> | The result was disappointing. The use of db ran about 2.5% faster >> | than the use of CurrentDb. In my opinion this is such a small >> | difference, that - in practical situations - it is neglectable. >> | I'm very interested in why you concluded NEVER to use CurrentDb in >> | a loop. At least, it did not give me that feeling after 100,000 >> | times! Have you considered Debug.Print DBEngine(0)(0) Is DBEngine(0)(0) 'True Debug.Print DBEngine(0)(0) Is CurrentDb() 'False Debug.Print CurrentDb Is CurrentDb() 'False -- lyle fairfield |
|
|
||||
|
||||
|
|
|
|||
|
On Sep 4, 4:04*am, lyle fairfield <lylef...@yah00.ca> wrote:
> hbinc <j.van.g...@hccnet.nl> wrote innews:29746a09-2bb8-45d6-9afc-70eae6aa6520@t2g2000yqn.googlegroups.com: > > >> | The result was disappointing. The use of db ran about 2.5% faster > >> | than the use of CurrentDb. In my opinion this is such a small > >> | difference, that - in practical situations - it is neglectable. > >> | I'm very interested in why you concluded NEVER to use CurrentDb in > >> | a loop. At least, it did not give me that feeling after 100,000 > >> | times! > > Have you considered > > Debug.Print DBEngine(0)(0) Is DBEngine(0)(0) 'True > Debug.Print DBEngine(0)(0) Is CurrentDb() 'False > Debug.Print CurrentDb Is CurrentDb() 'False > > -- > lyle fairfield Hi Lyle, No, I did not consider that. What I conclude is that with DBEngine(0)(0) you always get the same pointer, whereas CurrentDb returns a new pointer to a database-object. I do not yet know if this means that it is a complete new object, or just an indirect pointer to an already defined object. I have to do some research in that direction. At least DBEngine(0)(0) "seems" to be the most efficient, but I don't like the syntax. But first I have to go for a survival weekend in the Ardennen. I hope to return, and comment again next week. Have fun, HbInc. |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|