NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.1+)

Updatable Result Set
The JDBC Driver for SQL/MX supports both read-only and updatable concurrency modes. The JDBC Driver for
SQL/MX expects the following criteria for a result set to be updatable:
The table name of the first column in the result set is assumed to be the table to be updated. This assumption
allows queries from multiple tables also to be updatable.
The query selects the primary key columns of the table to be updated.
The JDBC Driver for SQL/MX throws an SQLException when any of the following conditions occur:
The primary key columns are updated.
Any selected column has been updated since the most recent time it was read. (However, the JDBC Driver for
SQL/MX does not ensure that columns in the table that are not part of the select query remain unchanged since
the row was most recently read.)
A query does not select nonnullable columns or columns that do not have a default value.
The result set is also affected in the following ways:
A deleted row is removed from the result set. The method
databaseMetaData.deletesAreDetected() returns false.
An inserted row is added to the result set at the current cursor position. The method
databaseMetaData.insertsAreDetected() returns true.
Batch updates
The batch update facility allows a Statement object to submit a set of heterogeneous update, insert, or delete
commands together as a single unit to the database. This facility also allows multiple sets of parameters to be
associated with a PreparedStatement object.
When the autocommit mode is enabled, the JDBC Driver for SQL/MX commits the updates only when all commands
in the batch succeed. If any command in the batch fails, the updates are rolled back in both autocommit and
nonautocommit mode.
Compaq Extensions
The following Compaq extensions to the JDBC standard are implemented in the JDBC Driver for SQL/MX.
Interval Data Type
The interval data type is not a generic SQL type defined in the JDK 1.2.2, but SQL/MX supports interval data
type. To allow JDBC applications for SQL/MX to access the interval data type, the JDBC Driver for SQL/MX
maps it to the Types.OTHER data type. The JDBC Driver for SQL/MX enables the getObject() and
getString() methods of the ResultSet interface, and the setObject() and setString() methods of the
PreparedStatement interface, to access this data type. The interval data type is always accessed as a
String object. The JDBC Driver for SQL/MX also allows escape syntax for interval literals.
Internationalization
The JDBC Driver for SQL/MX is designed so that it can be adopted for various languages. The error messages in
JDBC/MX components are stored outside the source code in a separate property file and retrieved dynamically based
on the locale setting. The error messages in different languages are stored in separate property files based on the
language and country.