As said in many discussion before, instead of accessing directly to the 
DB, you should create a vCal and beam it localy with the Exchange 
Manager to the DateBook.

This way, your application will be independant of any change that, 
maybe, could, happend in the DB :) and will be compatible with furture 
version of the application.

Instead of using the code that access directly to the DB, try a look at 
the code that generate a vCal (DateTransfert.c) and change the exg 
prefix by "_local".

Hope this help

Ludovic

[EMAIL PROTECTED] wrote:
> 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/

Reply via email to