Re: cancel during asyncfetchnonblocking

From: Brian Bushay TeamB (BBushay_at_Nmpls.com)
Date: 08/18/04


Date: Tue, 17 Aug 2004 20:08:37 -0500


> 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?
Try

AdoDS.Recordset.Cancel;
AdoDS.Close;

--
Brian Bushay (TeamB)
Bbushay@NMPLS.com


Relevant Pages

  • Re: How to record quotation marks
    ... query1.sql.add('insert into memorando (chamada, texto) values ... or use parameters in your query ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: About lookup fields..
    ... No you will have to use a TadoDataset and then create the field in your query to ... sort by it. ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: ADO DBASE Seek
    ... Willi ... > Probably using a select query ... > Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: cancel during asyncfetchnonblocking
    ... >Can you use the same object for another query? ... >settings but can't seem to get this working in an OK ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: How to clear memory usage after executing queries ?
    ... got scared when the memory usage reached 1.7 gig (the machine has 2 gig of ... select distinctfrom packet, then do query ... > Columnist, SQL Server Professional ... > The only way to clear up the memory usage is by stopping SQL Server Service ...
    (microsoft.public.sqlserver.programming)