UltraLite User's Guide
Developing Embedded SQL Applications
Preprocessing your embedded SQL files
If you have more than one embedded SQL source file, you must run the UltraLite generator separately. You must also run the UltraLite generator separately if you use transport-layer security or if you use synchronization publications.
You must specify an UltraLite project on the sqlpp command line so that the SQL statements in the files are grouped together in the same project in the reference database.
For information on projects, see Creating an UltraLite project.
To preprocess an embedded SQL source file (more than one file)
Preprocess each embedded SQL source file.
Use the -p
switch to specify a project name when you run the SQL preprocessor. Use the same project name when you preprocess each embedded SQL file in your project.
Run the UltraLite generator to create the supplementary C/C++ code.
For more information on the generator, see Generating the UltraLite data access code.
By default, the UltraLite generator, ulgen, writes to the file project-name.c. Choose a project name not already assigned to another C or embedded SQL source file, so that an existing file will not be overwritten.
Suppose that your project contains two embedded SQL source files, called store.sqc and display.sqc. You could give your project the name salesdb and process these two commands using the following commands. (Each command should be entered on a single line.)
sqlpp -c "uid=dba;pwd=sql" -p salesdb store.sqc sqlpp -c "uid=dba;pwd=sql" -p salesdb display.sqc
These two commands generate the files store.c and display.c, respectively. In addition, they store information in the reference database for the UltraLite analyzer.
For detailed information about the SQL preprocessor, see The SQL preprocessor.