Example: Check for ANSI compliance
This example shows how to start DB-Access and check whether a database is ANSI-compliant.
To check your SQL statements for compliance with ANSI standards,
include the -ansi option or set the DBANSIWARN environment
variable. Use the -ansi option with other dbaccess options
such as -dc (to create a database), -tc or -ta (to
create or alter a table), or -qc filename (to
choose a command file). The following command checks for ANSI compliance
while DB-Access creates
the database research:
dbaccess -ansi -dc research
You do not need to specify the -ansi option on the command line if the DBANSIWARN environment variable is set.
DB-Access displays
the SQLSTATE value with the warning under the following circumstances:
- You include the -ansi option or set the DBANSIWARN environment variable.
- You access or create an ANSI database.
- You run DB-Access in command-line mode or specify a .sql input file.
- Running an SQL statement generates a warning rather than an error.