UltraLite for MobileVB User's Guide
Tutorial: An UltraLite for MobileVB Application for Palm OS
The first step is to create a directory to hold your work, and an UltraLite schema file that holds the database schema.
Create a directory and a schema file
Create a directory to hold the files you create in this tutorial.
This tutorial assumes the directory is c:\tutorial\mvb. If you create a directory with a different name, use that directory instead of c:\tutorial\mvb throughout the tutorial.
Design a database schema using the UltraLite Schema Painter:
To start the UltraLite Schema Painter, choost Start
For more information on creating database schemas with the UltraLite Schema Painter, see the UltraLite Schema Painter Tutorial.
Schema filename tutcustomer.usm
Table name customer
Columns in customer
Column Name | Data Type (Size) | Column allows NULL values? | Default value |
---|---|---|---|
id | integer | No | autoincrement |
fname | char(15) | No | None |
lname | char(20) | No | None |
city | char(20) | Yes | None |
phone | char(12) | Yes | 555-1234 |
Primary key ascending id
Export the schema to Palm with a creator id of Syb3.
From the File menu, choose Export Schema for Palm.
Enter Syb3 as the creator ID.
Save the file as tutcustomer.pdb in your tutorial directory.
A note on Palm Creator ID'sA Palm creator ID is assigned to you by Palm. You can use Syb3 as your creator ID when you make sample applications for your own learning. However, when you create your commercial application, you should use your own creator ID. |
The next step is to create an UltraLite for MobileVB project for your application. You can use a MobileVB project to get MobileVB controls that are suitable for small devices. On the Visual Basic toolbar on the left of the Visual Basic environment, MobileVB tools appear in addition to the standard Visual Basic tools.
To create an UltraLite for MobileVB project
Start MobileVB
Click Start
Create a new project.
Choose a design target for your application. When asked for the Design Target, choose Palm OS.
Create a Visual Basic reference to the UltraLite for MobileVB component:
Click Project
Ensure the box beside the item iAnywhere Solutions, UltraLite for MobileVB 9.0 is checked.
If the control does not appear, for example if you installed MobileVB after installing SQL Anywhere Studio, run the following command to register the component:
ulmvbreg -r
Ensure the box beside the item UltraLite Connection Parameters 9.0 is checked.
Click OK.
Give the Project a name.
Click Project
Under Project Name, type UltraLiteTutorial (all one word). This is the name of the application as it will appear on your device.
Click OK
Save the Project:
Choose File
For the Form filename, type c:\tutorial\mvb\Form1.frm.
Click Save.
For the Project filename, type c:\tutorial\mvb\UltraLiteTutorial.vbp.
Click Save.
You are now ready to proceed to the next step in the tutorial.