AppForge Driver Application

In this section, we show you how to integrate the DBSLibFuser into a simple AppForge application to create a database and to populate a grid view control with the results. This application is similar to our driver application.

The main screen for the AppForge AFLibDriver application is shown in Figure 8-5, and appears similar to the DBSLib driver application.

AFLibDriver application

Figure 8-5. AFLibDriver application

The main screen consists of three buttons. GetAPI retrieves the API version of the library by passing the dbsFuserAppLaunchGetAPI launch code to our fuser. CreateDB creates the database and retrieves its metadata (name, number of records, schema, etc.) by passing the dbsFuserAppLaunchCreateDB launch code. ViewData does not use the fuser at all. When this button is clicked, we format an AppForge schema for the database, retrieve the records from the database, and display them in a grid view control, as shown in Figure 8-6.

AFLibDriver grid view

Figure 8-6. AFLibDriver grid view

Fuser Data Types

In order to call into the fuser, we use the following commands, or launch codes.

Public Const cmdGetAPI As Long   = 32767
Public Const cmdCreateDB As Long = 32768

We use the following type for marshaling data with the cmdCreateDB command. Each item corresponds to those listed in Table 8-7. We pass the ...

Get Programming Visual Basic for the Palm OS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.