If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#31
|
|||
|
|||
Infinite loops re-visited.
"James A. Fortune" wrote in
: David W. Fenton wrote: It assumes that the .Execute command executes asynchronously and that VBA code after it runs before the .Execute has completed. I think this is a completely unwarranted assumption. I have never at any point written any code that did not assume that .RecordsAffected was not completely accurate on the line immediately following the .Execute command. I have never seen a case in which it was *not* accurate, but your code assumes it gets updated as the delete is processed. I'm still forced to support the use of Jet 3.5 so I can only speak for that situation when I say that as far as I can tell, the VBA code after it sometimes runs before the .Execute has completed. Until I know that later versions of VBA aren't as 'helpful' in interacting with Jet, keeping such code around is only reasonable. I don't believe .Execute executed asynchronously in any version of Access that I've ever used (starting with 2, and Jet 2.5). I've certainly never written a line of code that didn't assume so, and never been surprised by the results. There is nothing in the Jet 3.5 Database Engine Programmers Guide that suggests asynchronous execution, nor that there is every a time when the .RecordsAffected property is available *after* an Execute and will not be accurate. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/ |
#32
|
|||
|
|||
Infinite loops re-visited.
David W. Fenton wrote:
I don't believe .Execute executed asynchronously in any version of Access that I've ever used (starting with 2, and Jet 2.5). I've certainly never written a line of code that didn't assume so, and never been surprised by the results. There is nothing in the Jet 3.5 Database Engine Programmers Guide that suggests asynchronous execution, nor that there is every a time when the .RecordsAffected property is available *after* an Execute and will not be accurate. Despite what you read, for Jet 3.5, my guess is that you were lucky not to run queries that executed long enough to dispel your incorrect assumption. Several others reported timing problems in CDMA associated with the same problem. Asynchronous DAO execution is the only reasonable explanation, but if you can come up with a better reason, I'd like to hear it. James A. Fortune |
Thread Tools | |
Display Modes | |
|
|