You are right I add 96 to the year and it appears on the good date. Very thanks
Helene > To have datebook display a record that you add to DatebookDB it must be (1) >Well-Formed, and (2) added in the right place. You appear to be doing all of these >in the code you include. Possibly you didn't look in the right place? The record >you add should appear on 27 September 1906 (years are in years after 1904). > > -bob mckenzie, plamsource pdx > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 27, 2002 9:30 AM > To: Palm Developer Forum > Subject: DatebookDb Problem > > > Hello, > > I would like with my application to put on the datebookDB a record which just >contains the sartTime and the description, > > I use the Function ApptNewRecord (and the other functions which ApptNewRecord use) >in the DateDB.c to put my record. The record is created but it doesn't appear when we >launch DateBook program!!! > > Maybe there is a particular format for date or another thing to do. > > Here is the data, I enter in the record > > DateDateB.year = 2; > DateDateB.month = 9; > DateDateB.day = 27; > when.date = DateDateB; > > TimeDateS.hours = 14; > TimeDateS.minutes = 00; > > when.startTime = TimeDateS; > > TimeDateE.hours = 15; > TimeDateE.hours = 00; > when.endTime = TimeDateE; > > newAppt.when = &when; > newAppt.description = (char *)"test"; > > > ApptNewRecord (ApptDB, &newAppt, &recordNum); > { > MemHandle recordH; > ApptPackedDBRecordPtr recordP; > UInt16 newIndex; > Err err; > > > // Make a new chunk with the correct size. > r->alarm=NULL; > r->repeat=NULL; > r->exceptions=NULL; > r->note=NULL; > recordH = DmNewHandle (dbP, (UInt32) ApptPackedSize(r)); > if (recordH == NULL) > return dmErrMemError; > > recordP = MemHandleLock (recordH); > > // Copy the data from the unpacked record to the packed one. > ApptPack (r, recordP); > > newIndex = ApptFindSortPosition(dbP, recordP); > > MemPtrUnlock (recordP); > > // 4) attach in place > err = DmAttachRecord(dbP, &newIndex, recordH, 0); > if (err) > MemHandleFree(recordH); > else > *index = newIndex; > > return err; > } > > > Thanks in advance > > Helene > ------------------------------------------ > > Faites un voeu et puis Voila ! www.voila.fr > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see >http://www.palmos.com/dev/support/forums/ > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see >http://www.palmos.com/dev/support/forums/ > ------------------------------------------ Faites un voeu et puis Voila ! www.voila.fr -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
