Hi all,
I really get mad with the Database and Conduit
development, can anybody
help me to solve.
Following is my AppStart Code, I create a DB call
CottonGroupDB-cthk,
then open the Symbol Scanner...My problem is after
install this
application into the devices, In the Palm's App Info,
there are 2 items
one is CottonGroup N/A records and version is 1.0
CottonGroupDB-cthk 5 records and version is 3.5
I think it is the source of problem when I try to
Create a conduit to
sync the data with my PC.
anybody can help me??? really urgent,, stuck for a
long time already.
Many Thanks,
Ron
static Err AppStart(void)
{
const UInt32 kType = 'DATA';
const UInt32 kCreator = 'cthk';
const char *kName = "CottonGroupDB-cthk";
Err err = 0;
LocalID dbID;
UInt16 attributes;
// open a database and create it if it does not exist
gDatabase = DmOpenDatabaseByTypeCreator( kType ,
kCreator,
dmModeReadWrite);
if (!gDatabase) {
err = DmCreateDatabase( 0, kName, kCreator, kType,
false );
if (!err) {
dbID = DmFindDatabase(0, kName);
attributes = dmHdrAttrBackup;
DmSetDatabaseInfo(0, dbID, NULL,
&attributes, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL);
gDatabase = DmOpenDatabaseByTypeCreator( kType,
kCreator,
dmModeReadWrite);
newRecord("405335503116", "12341", "A01");
newRecord("862071151749", "12342", "A02");
newRecord("302300020663", "12343", "A03");
newRecord("21906176", "12344", "A04");
newRecord("0142013", "12345", "A05");
if (!gDatabase)
err = DmGetLastErr();
}
}
numRecords = DmNumRecords( gDatabase );
err = DmQuickSort(gDatabase, (DmComparF
*)CompareIDFunc, 0);
// return err;
if (ScanIsPalmSymbolUnit()) {
err = ScanOpenDecoder();
if (err == 0) {
int i;
BarType allTypes[] = {
barCODE39, barUPCA, barUPCE, barEAN13,
barEAN8, barD25,
barI2OF5,
barCODABAR, barCODE128, barCODE93, barTRIOPTIC39,
barUCC_EAN128,
barMSI_PLESSEY, barUPCE1, barBOOKLAND_EAN,
barISBT128, barCOUPON};
for (i=0; i < sizeof(allTypes) / sizeof(*allTypes);
i++)
err = ScanSetBarcodeEnabled(allTypes[i], true);
err = ScanCmdSendParams(No_Beep);
err = ScanCmdScanEnable();
bOpenDecoderOK = true;
}
}
return 0;
}
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/