the line that produces a fatal exception is
VoidHand reg=DmQueryRecord(gEntradaDB,regIndex);
I have read in the reference manual that if you get a fatal exception is
because you especified a record out of range.
but,if i have 10 records and i want to retrive de 5th record values,how
can i know de index of that record??
when i create new records a use this:
void InsertarRegistro(DmOpenRef *dbp,CharPtr Hc,CharPtr Tip,ULong
registro)
{
Entrada *entrada;
Entrada e;
VoidHand regHandle;
UInt regIndex=dmMaxRecordIndex;
regHandle=DmNewRecord(dbp,®Index,sizeof(Entrada));
if (regHandle)
{
e.registro=registro;
e.Hc=Hc;
e.Tip=Tip;
entrada=MemHandleLock(regHandle);
DmWrite(entrada,0,&e,sizeof(e));
}
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/