Hi All, The line that causes the error was the DmDetach Line. I willo fix it today and mail again when the program still doesn't work! Thank you!!!
Tam Hanna http://tamspalm.blogspot.com Which line is causing the error? Step through with the debugger... (Could it be that you have a copy-and-paste mistake? You're detaching 9780 twice.) -David Fedor PalmSource, Inc. >Hi y all, >I am currently developing around on my PalmOS app and have encountered >the following error in my program's code while trying to transport >resources: Fatal Alert-DataMgr.c, Index out of range Here is the code: >if(DmCreateDatabase(cardno,"Menu-LedM",appFileCreator,'data',true) != >dmErrAlreadyExists ) >{ >DmOpenRef appdb, resdb; >LocalID idxo;UInt16 cardnoo; >MemHandle resource; >SysCurAppDatabase(&cardnoo,&idxo); >appdb=DmOpenDatabase(cardnoo,idxo,dmModeReadWrite); >resdb=DmOpenDatabaseByTypeCreator('data',appFileCreator,dmModeReadWrite); >DmDetachResource (appdb,9780,&resource); >DmAttachResource(resdb,resource,'Tbmp',9780); >DmDetachResource (appdb,9780,&resource); >DmAttachResource(resdb,resource,'Tbmp',9781); >DmCloseDatabase(appdb); >DmCloseDatabase(resdb); >} >What isn't working here? >Best regards >Tam Hanna > > >-- -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
