Hi,
>Can anyone help, i have multiple databases, i can get one of them to work
>o.k, but am unsure how to declaire the 2nd one.
You can declare (or open or create) the databases at the beginning, one after the
other.
After you are done, you close (or close then delete) them one by one.
The only thing is each database should has different data type ('Data', 'DATA',
'datA', or st else
you make up) and different database names. I use the same creator ID for all of them.
There is a
lot of threads about this issues. (Search for multiple database)
Are you going to slip your PilotMain()?
Something likes:
static UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
{
Err error;
error = RomVersionCompatible (launchFlags);
if (error) return (error);
switch (cmd)
{
case sysAppLaunchCmdNormalLaunch:
error = AppStart();
if (error)
return error;
FrmGotoForm(StartUpForm);
AppEventLoop();
AppStop();
break;
default:
break;
}
return errNone; // Return 0
}
Then you can
Open the databases in AppStart(),
Close the databases and all the forms in AppStop()
I use global variables for the database references and use them through out the
program.
Hope it helps.
tnn
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/