I not need help
I heat a POSE !!!!!!!!!!!!!!!!!
@_@

-- 
"R Moon" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> I have a problem,
> this function add a record to Database
> but when i execute DmNewRecord the MemHandle obtain 0x00000000
> and error is MemHandle NULL
> I have a fucntion, open DB
>
> Boolean other function
> {
> OpenDatabase(&Database);
> AddNewREcord(Database); //call the function to add record
> }
>
> static Err AddNewRecord(DmOpenRef db)
> {
>  UInt16        recordIndex = DmNumRecords(db) + 1 //dmMaxRecordIndex;
>    PacienteStruc  newRecord;
>    MemHandle     myRecordHandle;
>    PacienteStruc  *newRecordPtr;
>    Err      err;
>    newRecord.Nombre = "Bill";
>    newRecord.Apellidos = "Mother";
>    newRecord.Dia = "1";
>    newRecord.Mes = "1";
>    newRecord.Anio = "1";
>    newRecord.Sexo = "M";
>    newRecord.PatPrev = "I Heat DmNewRecord";
>
>   myRecordHandle = DmNewRecord(db, &recordIndex, sizeof(newRecord));
>   newRecordPtr = MemHandleLock(myRecordHandle);
>   err = DmWrite(newRecordPtr, 0, &newRecord, sizeof(newRecord));
>   MemHandleUnlock(myRecordHandle);
>   return err;
> }
>
> the struct is
> typedef struct PacienteStruc
> {
>  Char *Nombre ;
>  Char *Apellidos;
>  Char *Dia ;
>  Char *Mes ;
>  Char *Anio ;
>  Char *Sexo ;
>  Char *PatPrev;
> } PacienteStruc ;
>
> typedef PacienteStruc* PacienteStrucPtr;
> -- 
> Rubén Luna Cabret
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to