> in my code - but the database is not copied to the PC
> during a hotsync. What's wrong?
Don't know why your calls aren't working, but here's a function that I use
to set or clear the backup bit which works fine.
UInt16
cfSetBackupBit(
DmOpenRef dbPP, // database
Boolean isSetting) // false to clear the bit
{
LocalID dbID;
UInt16 cardNo;
UInt16 attributes;
Err err;
// get specifics about the database
if ((err = DmOpenDatabaseInfo(dbPP, &dbID, NULL,NULL, &cardNo, NULL)) !=
errNone)
return err;
// get the attributes
if ((err = DmDatabaseInfo(cardNo, dbID, NULL, &attributes, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL)) != errNone)
return err;
if( isSetting==true )
attributes |= dmHdrAttrBackup;
else
attributes &= ~dmHdrAttrBackup;
return DmSetDatabaseInfo(cardNo, dbID, NULL, &attributes,
NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL);
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/