Re: EOAsyncFetchNonBlocking Question



Randy,

On Fri, 16 May 2008 02:28:30 +0100, Randy Adanza <radanza@xxxxxxxxxxx> wrote:

Then I found out that by setting TADOQuery.ExecuteOption to
EOAsyncFetchNonBlocking speeds up things quite nicely. However, I found
out that it seems to bypass the First and
Last record, I did however found a fix for that.

Just place this code inside the OnAfterScroll event of TADOQuery.

if DataSet.Bof or DataSet.Eof then
begin
DataSet.DisableControls ;
with TCustomADODataSet ( DataSet ) do
begin
if Bof then
Recordset.MoveFirst
else
if Eof then
Recordset.MoveLast ;
CursorPosChanged ;
Resync ( [ ] ) ;
end ;
DataSet.EnableControls ;
end ;

The underlying code may have changed since I was trying to wring the maximum performance out of my ADO queries, but ISTR that (at least for me back in D6) that any call to "MoveFirst" or "MoveLast" or accessing the RecordCount could not complete until the whole recordset had been retrieved - which somewhat negated the point of using AsynchFetch :)

--
Paul Scott
Information Management Systems
Macclesfield, UK.
.



Relevant Pages

  • Re: EOAsyncFetchNonBlocking Question
    ... EOAsyncFetchNonBlocking speeds up things quite nicely. ... I found out that it seems to bypass the First and ... I did however found a fix for that. ... Information Management Systems ...
    (borland.public.delphi.database.ado)
  • Re: Bypass mount/system request at boot time?
    ... it to bypass? ... sufficient error handling in systartup_vms.com, ... a quick fix from far away. ... I was nervous asking them to pull the drive, ...
    (comp.os.vms)
  • Re: [Full-disclosure] Vulnerabilities in Timbuktu Pro 8.6.5
    ... B] limited upload directory traversal ... Currently I have found no ways to bypass this limitation. ... Fix ...
    (Full-Disclosure)
  • Re: [Full-disclosure] Vulnerabilities in Timbuktu Pro 8.6.5
    ... B] limited upload directory traversal ... Currently I have found no ways to bypass this limitation. ... Fix ...
    (Bugtraq)
  • When Opening Form
    ... think you would be able to bypass that step. ... someone else enter data I am afraid they will overwrite on an existing record. ... Please help with what I know will be a quick fix. ...
    (microsoft.public.access.forms)