Compiling Client-Server Application Programs
The “SET SQLCOMPILE” Command
Zim is designed to take advantage of many characteristics of a given SQL server. Many SQL servers provide compile time facilities to increase performance at runtime. A compile time option enables you to control when the database server does certain compilation functions such as statement parsing. If SQLCOMPILE is OFF, then these functions are performed at Zim’s runtime. If SQLCOMPILE is ON, these function are performed as Zim compiles the application, if possible. This option is set using the command:
SET SQLCOMPILE [ ON | OFF ]
The default setting for SQLCOMPILE is OFF.
In order to take advantage of these facilities, you must be connected to the SQL server at compile time. If this option is turned off, all work is done at run time and you do not have to be connected at compile time.
Different applications being compiled against the same SQL server database can have programs with the same name (i.e. “MAIN”). To avoid conflicts that can arise when compiling several applications against the same SQL server database, each application should be flagged with a unique identifier. The “config.zim” entry is
SQL DATABASE NAME xxx
where “xxx” is a three-character ID. Zim makes use of this ID when compiling. It should be noted that SQLCOMPILE can be turned on or off for a single statement if desired.