UltraLite User's Guide
Developing Applications for the Palm Computing Platform
Launching and closing UltraLite applications
Whenever your UltraLite application is closed, and the user switches to another application, your code must call the function to save its state. Some kinds of data cannot be kept open during the time that you move away from an UltraLite application.
For embedded SQL development, this function is ULPalmExit. For C++ API development, this function is the ULData.PalmExit() method.
For C++ API developers, the following considerations also apply:
Do not close any ULData or ULConnection objects.
When the user returns to the application, call Reopen, first on the ULData and then on the ULConnection object.
For cursor objects, including instances of generated result set classes, you can do either of the following:
Ensure that the object is closed when the user switches away from the application, and call Open when you next need the object. If you choose this option, the current position is not restored.
Do not close the object when the user switches away, and call Reopen when you next need to access the object. The current position is then maintained, but the application takes more memory in the Palm when the user is using other applications.
For table objects, including instances of generated table classes, you cannot save a position. You must close table objects before a user moves away from the application, and Open them when the user needs them again. Do not use Reopen on table objects.
Do not call db_fini to close the application. Instead, call ULPalmExit. All connections (on a single SQLCA) and cursors remain open.
For more information, see ULPalmExit function, and PalmExit method.