You gave me an idea: only count the records from the end of the DB since
all deleted records are moved there. It works!!
What do you think? Here is the code in Pascal:
function NumRemovedRecords(Db: DmOpenRef): UInt16;
var
I: Integer;
Attributes: UInt16;
begin
Result := 0;
if DmNumRecords(Db) > 0 then
begin
for I := DmNumRecords(Db) - 1 downto 0 do
begin
DmRecordInfo(Db, I, Attributes, nil, nil);
if (Attributes And dmRecAttrDelete) > 0 then
Inc(Result)
else
Break;
end;
end;
end;
Todd
--
Todd Cary
Ariste Software
[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/