We have read the docs and we have a question on how o save the text in
our field. This is our code.
gDb=DmOpenDatabaseByTypeCreator(yourdbtype,yourapptype,dmModeReadWrite);
if(! gDb)
DmCreateDatabase(0,yourdbname,yourapptype,yourdbtype,false);
DmOpenDatabaseInfo(gDb,&theLocalID,NULL,NULL,&theCardNum,NULL);
DmDatabaseInfo(theCardNum,theLocalID,NULL,&theAttributes,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
theAttributes |= dmHdrAttrBackup;
theCardNum=0;
DmSetDatabaseInfo(theCardNum,theLocalID,NULL,&theAttributes,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
if (adding)
{
myRecordHandle=DmNewRecord(gDb,
&RecordIndex, sizeof(newRecord));
newRecordPtr=(OurStruct
*)MemHandleLock(myRecordHandle);
newRecord.cost=Coster;
newRecord.serialnum=Serial;
newRecord.datefield=Dater;
newRecord.itemname=Namer;
newRecord.lin=Lin;
newRecord.nsn=Nsn;
DmWrite(newRecordPtr,0,&newRecord,sizeof(newRecord));
DmWrite(newRecordPtr,0,(CharPtr)
&newRecord->serialnum,sizeof(newRecord));
MemHandleUnlock(myRecordHandle);
}
Our code works and actually saves records but in the records, our field's text is not
in there. Please help us! Thanks!
GOD Bless!!!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/
- Re: We have read the docs! DrumBSF
- Re: We have read the docs! Aaron Ardiri
- RE: We have read the docs! Robert McKenzie
- RE: We have read the docs! Richard Burmeister
- Re: We have read the docs! Scott Herman
- RE: We have read the docs! Robert McKenzie
- Re: We have read the docs! Richard M. Hartman
