Thanks for your thoughts. I've checked that the error occurs when calling my shutdown routine which closes the database (i.e. when calling DmCloseDatabase). DmOpenDatabaseInfo isn't called during the shutdown routine - the only time it is called is when creating the database.
"Ben Combee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 07:28 PM 4/20/2004, you wrote: > >Hi all, > > > >I am writing an application that contains 4 databases. On startup I open > >all 4 (and create if they don't already exist). I am finding however that > >when closing the program, an exception occurs. In particular, when > >running the program in the emulator, the following error is displayed upon > >closing the application: > > > >"Hardware exception #2 occurred while the emulator was calling the Palm OS > >function DmOpenDatabaseInfo." > > > >However, if I only open 1 of the 4 databases, everything works correctly - > >the error only occurs when at least 2 databases are opened. Here is my > >code to initialise each database: > > Do you have code in your shutdown routines that call > DmOpenDatabaseInfo? That would be the first place to look. Also, put a > breakpoint at the end of PilotMain and see if this is coming from the > shutdown code that your tool provides, rather than your own code. > > -- Ben Combee, senior DTS engineer, PalmSource, Inc. > Read "Combee on Palm OS" at http://palmos.combee.net/ > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/