Re: TZF - SetFilterTo
Marie Vihonsky <[email protected]> Tue, 13 Jan 2004 02:25:52 -0500
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Hi Pierre,
If the database is indexed on 'NUMBER' then it would be faster to use
SetWhileTo instead of SetFilterTo
if not Dbase.Find(actualBill) then
exit;
{we found the start of the NUMBER}
DBase.SetWhileTo('NUMBER == "'+ actualBill +'"');
{do not use gotop to reposition the database - it will}
{move you out of the grouping}
now you can do stuff like:
while not Dbase.dEof do begin
// something here
end;
or show the data in a grid with no further logic. Hope this helps.
Marie
Pierre Wittwer wrote:
> Hi Topaz-Users
>
> I use a Dbase with about 10'000 records. I have to put a filter similar to
>
>
>
> DBase.SetFilterTo('NUMBER == "'+ actualBill +'"');
> when actualBill ist the string for choosen bill number
> and NUMBER for the searched bill number
>
> It functions, but is very slow. It takes about 10 seconds, to filter the
> Records.
>
> Is there another possibility.
>
> Thank you for your help
>
>
> Pierre Wittwer
> 6370 Stans
> Switzerland
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
--^----------------------------------------------------------------
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]
TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------