Paul Nevai wrote in message <7676@palm-dev-forum>...
>
>Hi Guys:
>
>If I want to remove all deleted records except those which were archived,
>then is this the right way to do it? Thanks! Best regards, Paul
>
>###########################################################################
##
>{
>UInt16 recordNumberTotal = DmNumRecords (MemoDB);
>UInt16 attributes;
>Int16 i;
>LocalID chunkID;
>
>for (i = recordNumberTotal - 1; i >= 0; i--)
> {
> DmRecordInfo (MemoDB, i, &attributes, NULL, &chunkID);
> if ((attributes &= dmRecAttrDelete) && chunkID == 0)
> DmRemoveRecord (MemoDB, i);
> }
>}
>###########################################################################
##
>
>
The "&=" will be setting "attributes" to the value of dmRecAttrDelete.
I assume you want to check it instead. Use "&".
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html