I have working code with the following differences:
 - check the return from DmFindDatabase()
 - use DmDatabaseInfo() to get current attributes and then OR them:
attribute |= dmHdrAttrBackup before calling DmSetDatabaseInfo()
 - my code uses NULL instead of DBName in the DmSetDatabaseInfo()


-- 
-------------------------------------------------------------------------
Free software  - Baxter Codeworks  www.baxcode.com
-------------------------------------------------------------------------


"Kristian Austad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's probably just me having a bad day but I can't get my app to set the
> backup attribute after creating a database.
>
> UInt16 attribute;
> LocalID myID;
>
> DmCreateDatabase(0, DBName, CreatorID, 'data', false);
> myID=DmFindDatabase(0, DBName);
> attribute=dmHdrAttrBackup;
> DmSetDatabaseInfo(0, myID, DBName, &attribute, NULL, NULL, NULL, NULL,
NULL,
> NULL, NULL, NULL, NULL);
>
> Anyone see what's wrong with my code?
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to