Re: EOAsyncFetchNonBlocking Question
- From: "Paul Scott" <paul.scott@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 16 May 2008 13:01:11 +0100
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.
.
- References:
- EOAsyncFetchNonBlocking Question
- From: Randy Adanza
- Re: EOAsyncFetchNonBlocking Question
- From: Paul Scott
- Re: EOAsyncFetchNonBlocking Question
- From: Randy Adanza
- EOAsyncFetchNonBlocking Question
- Prev by Date: Re: EOAsyncFetchNonBlocking Question
- Next by Date: Re: Return value in stored procedure
- Previous by thread: Re: EOAsyncFetchNonBlocking Question
- Index(es):
Relevant Pages
|