cancel during asyncfetchnonblocking
From: Lutz Kutscher (imnot_at_home.de)
Date: 08/17/04
- Next message: Mark A. Deal: "Re: How to detemine key fields from an ADO Recordset?"
- Previous message: Mark A. Deal: "Assign one BLOB to another"
- Next in thread: Brian Bushay TeamB: "Re: cancel during asyncfetchnonblocking"
- Reply: Brian Bushay TeamB: "Re: cancel during asyncfetchnonblocking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 17 Aug 2004 21:27:44 +0200
Hi,
I wanted to use the ExecuteOption eoAsyncFetchNonBlocking to build a
progressive filtering form:
In the OnShow event of my form I open a query on a large table
(20,000+ records):
"select * from HugeTable"
Since it is opened in non blocking mode, the user can enter a search
string into a TEdit control.
The OnChange of that TEdit looks like this:
TMyForm.Edit1Change(Sender: TObject);
begin
AdoDS.Close;
AdoDS.CommandText := 'select * from HugeTable where SearchField='''
+ Edit1.Text + '''';
AdoDS.Open;
end;
The problem with this seems to be, that the query is not really cancelled
with the
AdoDS.Close - looking at my memory usage it climbs incredibly.
I tried using the OnFetchProgress event to set EventStatus to esCancel
- the name and declaration as var parameter sounded like it could work -
nothing.
Can anyone around here tell me, how to really tell ADO to stop loading the
data that isn't needed any longer?
Thanks a lot
Lutz
- Next message: Mark A. Deal: "Re: How to detemine key fields from an ADO Recordset?"
- Previous message: Mark A. Deal: "Assign one BLOB to another"
- Next in thread: Brian Bushay TeamB: "Re: cancel during asyncfetchnonblocking"
- Reply: Brian Bushay TeamB: "Re: cancel during asyncfetchnonblocking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]