Previous Topic Next topic Print topic


SQL(CHECK) Command-line Options

You can improve SQL syntax checking in some scenarios by combining SQL(CHECK) with additional compiler directive options and/or using a local database.

SQL(CHECK) with SQL(DB) and, optionally, SQL(PASS)
When you use the SQL(CHECK) and SQL(DB) directives, together with SQL(PASS) if necessary, OpenESQL opens a connection to a data source at compile time and uses the data source to perform additional checking. This is the recommended way to use OpenESQL and is much more reliable at detecting errors. In addition to detecting syntax errors that are specific to a particular data source, it can also detect misspelled names and invalid use of reserved words.
SQL(CHECK), local database, deployment schema
OpenESQL is at its most effective when you use SQL(CHECK) with a local database that uses the same schema that is used when the application is deployed. This combination compiles programs faster than accessing a networked server for compile-time checking.
SQL(CHECK), local database, no deployment schema
When you do not have access to a data source with the deployment schema installed you can still use SQL(CHECK) to perform additional syntax checking, but you must also use SQL(IGNORSCHEMAERRORS) to avoid errors for invalid name use. SQL(IGNORESCHEMAERRORS) is also helpful when your program uses temporary tables that exist only at runtime.
Previous Topic Next topic Print topic