I build a sample program that saves data to a database
in this format
typedef struct
{
Char title[45];
} textRec;
After saving the data to the database I am using the
palm program insider to view the data and I am seeing
some funny text. Below is the code that saves the
data to the database is this right??
static void checkForDatabase()
{
DmOpenRef dbRef;
int foundProgram = false;
UInt32 recCounter = 0;
UInt16 at = 0;
dbRef =
OpenRecordDatabaseappDatabase,appFileCreator,appDatabaseType);
recCounter = DmNumRecords(dbRef);
if(recCounter < 2)
{
for(UInt16 i = 0; i < 120;i++)
{
MemHandle h = DmNewRecord( dbRef, &i,
sizeof(textRec));
textRec *rec = (textRec *) MemHandleLock(h);
textRec tempRec;
StrPrintF( tempRec.title, "Row %d", i +1);
DmWrite (rec, 0, &tempRec, sizeof (tempRec));
DmReleaseRecord( dbRef, i, true );
MemHandleUnlock( h );
}
}
DmCloseDatabase(dbRef);
return;
}
Why is insider showing funny text on the lines??
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/