UltraLite User's Guide
Developing UltraLite Applications
Defining SQL statements for your application
When you add SQL statements to a reference database, you assign them to an UltraLite project. By grouping them this way, you can develop multiple applications using the same reference database.
When the UltraLite generator runs against a reference database to generate the database source code files, it takes a project name as an argument and generates the code for the SQL statements in that project.
You can define an UltraLite project using Sybase Central or by directly calling a system stored procedure.
If you are using embedded SQL, the SQL preprocessor defines the UltraLite project for you and you do not need to create it explicitly.
To create an UltraLite project (Sybase Central)
From Sybase Central, connect to your reference database.
For instructions on using Sybase Central, see Connect to the sample database.
In the left pane, open the database container.
In the left pane, open the UltraLite Projects folder.
In the right pane, double-click Add UltraLite Project.
The UltraLite Project Creation wizard appears.
Enter an UltraLite project name and click OK to create the project in the database.
For information on UltraLite project naming rules, see ul_add_project system procedure.
To create an UltraLite project (SQL)
From Interactive SQL or another application, enter the following command:
call ul_add_project( 'project-name' )
where project-name is the name of the project.
For more information, see ul_add_project system procedure.
To create an UltraLite project (embedded SQL)
If you are using the embedded SQL development model, specify the UltraLite project name on the SQL Preprocessor command line, and the preprocessor adds the project to the database for you.
For more information, see Pre-processing your embedded SQL files.
UltraLite project names must conform to the rules for database identifiers. If you include spaces in the project name, do not enclose the name in double quotes, as these are added for you by Sybase Central or the stored procedure.
For more information, see Identifiers.