HI,
you declare it like
DmOpenRef yourDB; // handle for database
// Application database management defines.
#define yourAppType 'Sync' // Type for application. must be 4 chars,
mixed case.
#define yourDBType 'Data' // Type for application database. must be 4
chars, mixed case.
#define yourDBName "YourDB" // Name for application database. up to 31
characters.
>From now on, after you have opened the database, you will use that
reference -yourDB- instead of the name of the database you are managing:
For example:
mode = dmModeReadWrite;
// This looks for the database, if it doesnt exist then returns 0
yourDB= DmOpenDatabaseByTypeCreator(yourDBType, yourAppType, mode);
// The DB doesn�t exist, create now.
if ( ! yourDB)
{
error = DmCreateDatabase(0, yourDBName, yourAppType, yourDBType, false);
}
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 2:03 PM
Subject: How do you get a bloody pointer to a Database?
> A lot of commands use a DmOpenRef to an open database in the command. What
the hell is that and how do you declare or define one?
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/