oh boy... i can't seem to get mozilla's news reader to
log onto news.palmos.com... so i will use mail to
petition the palm universe for much needed help for a
newbie
i am developing a conduit that updates a user's
databookDB with flat information from a webpage... i
have used microsoft's .NET wizard to create a c++
datebook .dll conduit and i added code to successfully
get the data from the web as so:
01/01/03// "OR 3PM"
01/02/03// "OR 2PM"
01/02/03// "2nd call"
01/03/03// "OR 7AM"
this is fine... and works well... now i just want to
update the users databook on the palm, replacing all
entries with a category of, say, "ACME" with the new
date information... here is some pseudo code that i
wrote to do it:
UInt16 cardNo = 0; // need to find out the real
cardnumber
int succ_cnt=0, fail_cnt=0;
bool resourceDB = false;
bool dirty = false;
char *nameP = "DatebookDB";
UInt32 *typeP, *creatorP, *numRecordsP, *dataBytesP;
LocalID dbDBhandle = DmFindDatabase (cardNo, nameP);
if (db = DmOpenDatabaseByTypeCreator(DBType,
CreatorID, dmModeReadWrite | dmModeShowSecret))
DmOpenDatabaseInfo(db, &dbID, NULL, NULL, &dbCard,
NULL);
if (!DmDatabaseInfo(cardNo, dbDBhandle, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, LocalID
*sortInfoIDP, typeP, creatorP)
setLog("Cannot find db.", 0);
if (!DmDatabaseSize(cardNo, dbDBhandle, numRecordsP,
NULL, dataBytesP)
setLog("Cannot determine size of db.", 0);
if (!DmDeleteDatabase(cardNo, dbDBhandle)
setLog("Cannot delete db.", 0);
if (!DmCreateDatabase(cardNo, nameP, creatorP,
typeP, resourceDB)
setLog("Cannot create db.", 0);
DmOpenRef dbDBRef = DmOpenDatabase(cardNo,
dbDBhandle, dmModeExclusive);
for (int i=0; i<2dArrayOfDates.length; i++)
{
MemHandle recid = DmNewRecord (dbDBRef,
dmMaxRecordIndex, dataBytesP)
if (DmReleaseRecord(dbDBRef, recid, dirty)
succ_cnt++;
else
fail_cnt++;
}
if (!DmCloseDatabase(dbDBRef)
setLog("Cannot close db.", 0);
if (fail_cnt > 0)
setLog("Some records failed to transfer.", 0);
setLog("Successful execution.", 1);
ok... so if you're still with me... love it... ok...
the problem is that i can't find the .lib with the
routines (DmOpenDatabaseByTypeCreator, DmDatabaseInfo,
DmCreateDatabase, etc.) to link to... so i have three
questions:
1. does anyone know what libraries i need to get
these routines to link? (PalmOS.lib?)
2. do i even need to use routines from this API or
should i use the stuff that the wizard created?
long CSynchronizer::Perform(void)
long CSynchronizer::CopyPCtoHH(void)
long CSynchronizer::CopyAppInfoPCtoHH(void)
SyncReadDBAppInfoBlock(m_hhDB, info); (what is
this?!)
3. or i could just create the .dat file on the PC and
let the regular datebook conduit handle it then? has
anyone done that?
ok, thanx for listenin... er, reading
in awe of the palm community,
-steven m. almeroth
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/