I have a program that trys to create two databases.
Below are the constants I am using
#define appFileCreator 'XXXX'
#define appDatabaseType1 'DAT1'
#define appDatabaseType2 'DAT2'
#define appDatabase "MYDB"
Next is the code that trys to do the two creates
DmOpenRef dbRef1;
DmOpenRef dbRef2;
dbRef1 =
OpenRecordDatabase(appDatabase,appFileCreator,
appDatabaseType1);
dbRef2 =
OpenRecordDatabase(appDatabase,appFileCreator,
appDatabaseType2);
DmCloseDatabase(dbRef1);
DmCloseDatabase(dbRef2);
In the above code the 2nd call to OpenRecordDatabase
is getting a 537 error?
Heres the source code to the openRecordDatabase
static DmOpenRef OpenRecordDatabase( const Char *name,
UInt32 creatorID, UInt32 type )
{
UInt16 mode = dmModeReadWrite;
SystemPreferencesType prefs;
DmOpenRef dbRef;
PrefGetPreferences( &prefs );
if( !prefs.hideSecretRecords ){
mode |= dmModeShowSecret;
}
dbRef = DmOpenDatabaseByTypeCreator( type,
creatorID, mode );
if( !dbRef ){
Err err = DmCreateDatabase( 0, name,
creatorID, type, false );
if( err != 0 ) return NULL;
dbRef = DmOpenDatabaseByTypeCreator( type,
creatorID, mode );
}
return dbRef;
}
PLEASE HELP ME OUT IF U CAN
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/