SQL/MX Programming Manual for Java
SQL/MX Programming Considerations
HP NonStop SQL/MX Programming Manual for Java—523726-003
4-4
Causes of Dynamic Execution
profile and module, all the SQL statements in the program run dynamically in the
default run time.
The -missingSQLObject Set to True
If -missingSQLObject is true, the referenced database objects are not required to
exist at the time of customization for customization to succeed. If an SQL statement
refers to a database object that does not yet exist, the customizer does not extend the
statement in the profile and does not generate an entry of the statement in the module
definition (an embedded module definition or a module definition file). Ultimately, the
module does not contain the statement entry.
When you execute the SQLJ program, the SQLJ run time cannot load the
noncustomized SQL statements from the module and instead uses the default run time
to execute these statements dynamically.
The SQL statements that refer to database objects that exist at the time of
customization are extended in the profile and included in the module definition. The
SQLJ run time executes these customized statements statically.
Customization Errors
During customization, the customizer uses the profile (.ser) to generate a module
definition, which is either an embedded module definition in the extended profile or a
module definition file (.m), that contains SQL/MX-specific information for each
embedded SQL statement. If an error occurs during customization, such as a syntax
error, the customizer does not extend the profile and does not generate a module
definition. Such a program runs as if it were never customized, and all statements
execute dynamically.
Both the SQLJ translator and customizer use the same SQL/MX compiler to validate
an SQL statement. Therefore, if you used the SQL/MX SQLJ translator to process an
SQLJ program, it is unlikely that you would translate a program successfully and then
encounter a syntax error during customization.
If the customizer detects a syntax error in an SQL statement during customization, the
customizer reports the error in its output messages. In this case, the customizer does
not extend the profile and does not generate a module definition. If you choose to
ignore the output messages and run the program anyway, the program runs as if it
were never customized, and all statements execute dynamically. JDBC reports syntax
errors at run time.