A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Infinite loops re-visited.



 
 
Thread Tools Display Modes
  #31  
Old September 12th, 2009, 01:54 AM posted to microsoft.public.access
David W. Fenton
external usenet poster
 
Posts: 3,373
Default 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  
Old September 13th, 2009, 04:11 AM posted to microsoft.public.access
James A. Fortune
external usenet poster
 
Posts: 903
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:12 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.