Hi all, STUPID ME!!!! Sorry. dbP in DmOpenDatabaseInfo was not a DmOpenRef but a DmOpenRef* So all i needed to do was change the call to *dbP as below.
err = DmOpenDatabaseInfo(*dbP, dbID, NULL, NULL, NULL, NULL); Cheers, George B ----- Original Message ----- From: "George Bassili" <[EMAIL PROTECTED]> To: "PALM HELP" <[EMAIL PROTECTED]> Sent: Thursday, July 04, 2002 2:03 PM Subject: Invalid chunk error on DmOpenDatabaseInfo with valid dbopenref ! > Hi everyone, > > a funny one (at least i think so) > I am creating a database with the following code: > > err = DmCreateDatabase(cardno, name, creator, type, false); > if (err) > return err; > *created = true; > *dbP = DmOpenDatabaseByTypeCreator(type, creator, mode); > if (! *dbP) return DmGetLastErr(); > err = DmOpenDatabaseInfo(dbP, dbID, NULL, NULL, NULL, NULL); > return 0; > > > But when the DmOpenDatabaseInfo executes I get an Invalid chunk error. > > Funny thing is, if i move the DmOpenDatabaseInfo to the calling function so > it executes straight after the return 0, it works. > Why would this be??? > > Rgds, > george Bassili > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
