TOC PREV NEXT INDEX



Palm OS Platform database operations


This option allows the user to create code which interacts with the Palm OS Platform database, which is the method that the Palm OS Platform uses to store data on the Palm OS Platform. The options include

Before the Spotlet can interact with the underlying Palm OS Platform database, you must create a database object. The information needed to do this includes the Creator ID and Type ID of the database. Your Creator ID should be registered with Palm, Inc. at http://www.palmos.com/dev/tech/palmos/creatorid/reg.html .

Use create a database object if you wish to define the database object in the Declarations area of your code but not actually open the database until the constructor. Before actually using the database object, you will want to use the open a database option. This will ensure that the database is usable, because the code which the Code Sourcerer generates will create a new database if it does not already exist. If you will be using a database object inside a limited scope (for example, just inside a particular method), you can make a new database object and then open it.

It is possible to cause serious errors in the Spotlet if an attempt is made to access a database which is not already open, so a check to see if a database is open is a very useful thing to do before attempting to do other database operations.

Although databases can be closed by the Spotlet, it is important to close databases manually when they are no longer being used.

The Sourcerer also has options to add a record to a database, which will add a new record to the end of a database. You can also set a record of a database, and read a record or all the records from the database. You can delete a record or all the records from the database. Finally, there is an option to get the number of records currently in a database.


Data Representations, Inc.
http://www.datarepresentations.com
support@datarepresentations.com
sales@datarepresentations.com
TOC PREV NEXT INDEX