IBM Informix Embedded SQLJ User's Guide

######

IBM Informix Embedded SQLJ User's Guide Chapter 5: Processing Embedded SQLJ Source Code

Contents | Index |  |

## On-Line Checking On-line checking analyzes the validity of the embedded SQL statements against the database schema (user name, password, and database) you specify. On-line checking performs the following operations: Passes SQL data manipulation statements (DML) to the database to verify their syntax and semantics and their validity for the database schema. Checks stored procedures and functions for overloading. Runs the checks covered by off-line checking. Off-line checking verifies SQL syntax and usage of Java types; there is no connection to a database for off-line checking. To set up on-line checking, you use the following options with the java ifxsqlj command, or set them in a property file: -user, -password, -url, and -driver. These options are described in "Advanced Options". ### Setting the -user and -password Options You enable on-line checking by setting the -user option. The -user option also supplies the user name for the database connection to be used for checking. You do not have to specify the same database or user name for on-line checking as the application uses at runtime. In the simplest case, you supply a user name with the -user option, and on-line checking is performed using the default connection context, as in:

    -user = joyce
You can supply the password for the user name by using the -password option or by combining the password with the user name: for example, `-user = joyce/jcs123` or`-user = joyce -password =jcs123`. To disable on-line checking on the command line, set the -user option to an empty value (as in `-user=` ) or omit the option entirely. To disable on-line checking in a property file, comment out the line specifying sqlj.user. To enable on-line checking against a nondefault connection context, you specify the connection context with the user name in the -user option. In the following example, the SQLJ translator connects to the database specified in the connection-context object, conctx, using the user name fred:

    -user@conctx = fred
### Setting the -url and -driver Options The -url option specifies a JDBC URL for establishing a database connection (see "Database URLs"). The -driver option specifies a list of JDBC drivers that can be used to interpret JDBC connection URLs for on-line checking. Both of these options are shown in "Advanced Options".

IBM Informix Embedded SQLJ User's Guide, Version 1.0
Copyright © 1999, IBM Corporation. All rights reserved.