Re: TZF - DeleteRec
Eitan Gilboa <[email protected]> Tue, 8 Jul 2003 18:21:30 +0200
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
>> could you write me the Delphi format of "Delete all FOR <condition>"
You can use the POKE commend:
for example delete next HowMany records:
begin //Poke('*', 0, CurrRecord); // 0=FldNo, = Deleted
byte
j := TzDbf1.RecNo;
k := j + HowMany;
While j < k do
begin
Poke('*', 0, j);
inc(j)
end; //while
end;
or, without POKE:
BEGIN
// here below is the condition:
While ( (howMany > 0) AND (NOT TzDbf1.dEOF) )do
begin
TzDbf1.DeleteRec;
Dec(HowMany);
TzDbf1.Skip(1);
end;
END;
TzDbf1.EnableControls;
HTH,
Best wishes,
Eitan.
URL: http://perso.wanadoo.fr/eitang
==^================================================================
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
==^================================================================