Thanks Helene and Henk for all your input, but my application still doesn't work! What version of the SDK are you using? I'm using 4.0 (with update) for use on the m505, I'm just wondering whether that's where the conflict arises? I've basically done everything everyone else has, mine just doesn't work. Here's my code, in case anyone can point out what's wrong with it.
From debugging the code, it seems like it does add a record to the Datebookapplication, but when I launch the Datebook, the record doesn't show. Thanks in advance for all your help. (Thanks to Michael and Joe too for helping me with the palm-dev-forum list)
Colleen
err = DateGetDatabase (&ApptDB, dmModeReadWrite);
err = DmOpenDatabaseInfo(ApptDB, &dbID, NULL, NULL, &dbCardNo, NULL);
when.date.year = 98;
when.date.day = 15;
when.date.month = 11;
when.startTime.hours = 10;
when.startTime.minutes = 0;
when.endTime.hours = 11;
when.endTime.minutes = 0;
MemSet (&newAppt, sizeof (newAppt), 0);
newAppt.when = &when;
newAppt.description = (char *)"test";
ApptNewRecord (ApptDB, &newAppt, &recordNum);
DmCloseDatabase (ApptDB);
DmGetNextDatabaseByTypeCreator (true, &searchInfo, sysFileTApplication, sysFileCDatebook, true, &dbCardNo, &dbID);
if (dbID) {
err = SysAppLaunch (dbCardNo, dbID, NULL, sysAppLaunchCmdSyncNotify, NULL, &resultsP);
}
Notes on the code:
1. All needed code was copied from the Datebook application.
2. The dbID sent with SysAppLaunch is for the resource database of the application
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
