main logo
Subject: Re: Event for end of SQL query?
Author: Bob Archer
Posted: 2001/01/02 22:31:25
 
View Entire Thread
New Search


<I><FONT COLOR="#663300">When using asynch retrieval from SQL Server, is there an Event or otherwise some method to be told when the query has completed retreiving all records? I'd like to know this to update Nav toolbars and a few other tidbits, since I see using RECCOUNT() is a no-no before the end of the process, otherwise you don't get your UI control before the query is done.
</FONT></I>

YEs, put your SQLExec() command in a loop... it will return 0 if the quesry is still exectuing and non-zero when it is finished. If the non-zero is 1 it is done, if it is -1 there was an error.

You can put stuff inside the loop like checking for the escape key, updating so progress bar, whatever. I suggest you have a DoEvents command in there too.

BOb

 
©2001 Bob Archer
<-- Prior Message New Search Next Message -->