Contents Index UltraLite Schema Painter Tutorial The ULXML utility

UltraLite Database User's Guide
  Utility Programs

The UltraLite initialization utility


Applies to 

UltraLite components.

Function 

The ulinit utility lets you create a.usm file for use with any UltraLite component. The utility connects to an Adaptive Server Anywhere database. Consequently, SQL Anywhere Studio (version 8.0.2 or later) is required in order to use it.

Syntax 

ulinit -f schema_file -n pub_name [ options ]

Option Description
-c "connection_string" Supply database connection parameters in the form keyword=value, separated by semi-colons. You supply these so you may connect to an Adaptive Server Anywhere database.
-f schema_file Specify the name of the output file. This option is required.
-m version Specify the version string for generated MobiLink scripts.
-n pubname Add tables to the UltraLite database schema.

pubname specifies a publication in the reference database. Tables in the publication are added to the UltraLite database schema. Specify the option multiple times to add multiple publications in to the UltraLite database schema.

To add all tables in the reference database to the UltraLite schema, specify -n*.

This option is required.

-o "keyword=value;..." Supply schema creation options.
-palm id Create a schema file compatible with PalmOS. Id is the four digit Palm creator id that identifies the database.
-q Quiet operation — only report errors and warnings.
-s pubname Specify a publication for synchronization. pubname specifies a publication in the reference database that is added as a named publication to the UltraLite database.

If -s is not supplied, the UltraLite schema has no named publications.

This option can be used multiple times.

-t file Specify the file containing the trusted root certificates.
-w Do not display warnings.
-z ordering Specify table ordering (for example, -z table1,table2).
Remarks 

The -n and -s options both take publication names in the reference database as arguments, but serve different purposes:

Examples 

The following example creates a file called customer.usm that contains the tables in TestPublication:

ulinit -c "uid=dba;pwd=sql" -f customer.usm -n TestPublication

The following example creates a schema with two distinct publications:

ulinit -c "dsn=dsn-name" -f schema.usm -n Pub1 -n Pub2 -s Pub1 -s Pub2

For example, one of the publications may contain a small subset of data for priority synchronization, while the other would contain the bulk of the data.

Synchronization of publications is managed with a bitmask in the UltraLite schema. For more information, see Designing sets of data to synchronize separately.

When creating an UltraLite schema for Palm with ulinit, use the -palm option. This generates a .pdb file.

ulinit -c "uid=dba;pwd=sql;dsn=ASA 9.0 Sample"
-f tutcustomer.usm -n TutCustomersPub -palm Syb3
Note 
Syb3 is the four digit Palm registered creator ID that matches the creator ID of your application. For MobileVB developers, this must be set in your MobileVB project settings.

The PDB file generated by ulinit must be loaded to the Palm device. When an UltraLite application needs to connect to the database, it should include the creator ID in the parameters of the call to Open. For example:

DatabaseManager.OpenConnection( "palm_db=Syb3" )

Contents Index UltraLite Schema Painter Tutorial The ULXML utility