ALLBASE/SQL Reference Manual (36216-90216)

Chapter 1 57
Introduction
Native Language Support
Only DML statements can be checked for errors at the row level of atomicity. Refer to the
SET DML ATOMICITY statement in Chapter 12 , “SQL Statements S - Z,” for complete
details.
Deferring Error Checking beyond the Statement Level
Sometimes statement level atomicity is too narrow for your needs. For operations involving
more than one table, it may be useful to defer error checking until all tables are updated.
For example, if you are loading two tables that have a referential relationship that is
circular--that is, each table references a primary key element in the other table--then you
must defer constraint error checking until both tables are loaded; otherwise any attempt to
load a row would result in a constraint error. To defer referential constraint error checking
beyond the statement level, issue the following statement:
SET REFERENTIAL CONSTRAINTS DEFERRED
After the loading of both tables is complete, issue the following statement:
SET REFERENTIAL CONSTRAINTS IMMEDIATE
This turns on constraint error checking and reports any constraint errors that now exist
between the two tables. Only integrity constraint error checking can be deferred beyond
the statement level. For complete details, refer to the SET CONSTRAINTS statement
Chapter 12 , “SQL Statements S - Z.
Additional Information about Errors
Refer to the “Introduction” to the
ALLBASE/SQL Message Manual
for a general description
of error handling. For the coding of error handling routines in application programs, refer
to the chapter “Using Data Integrity Features” in the ALLBASE/SQL Advanced
Application Programming Guide and the “Runtime Status Checking and the SQLCA
chapter in the application programming guide for the language of your choice. For error
handling in procedures, refer to Chapter 4 , “Constraints, Procedures, and Rules.” For row
level error checking, see the SET DML ATOMICITY statement, and for deferred constraint
checking, see the SET CONSTRAINTS statement, both in Chapter 12 , “SQL Statements S -
Z.
Native Language Support
ALLBASE/SQL lets you manipulate databases in a wide variety of native languages in
addition to the default language, known as NATIVE 3000. You can use either 8-bit or
16-bit character data, as appropriate for the language you select. In addition, you can
always include ASCII data in any database, because ASCII is a subset of each supported
character set. The collating sequence for sorting and comparisons is that of the native
language selected.