JDBC Driver for SQL/MP 3.0

Java Docs Home Page | Contents | Index | Glossary | Prev | Next
Accessing SQL Databases with SQL/MP
Java programs interact with NonStop SQL databases using NonStop SQL/MP and the Java Database Connectivity
(JDBC) API.
The NonStop Server for Java and the JDBC Driver for SQL/MP include these items:
The JDBC 3.0 API
The JDBC DriverManager in the Java Development Kit (JDK) 1.4.1
These Type 2 drivers, which behave identically except where stated otherwise:
The standard driver, sqlmp, which manages transactions as described in the JDBC API documentation
provided by Sun Microsystems.
The transaction-aware driver, sqlmptx that lets you to define transactions outside of JDBC using the
methods described in the NonStop Server for Java Programmer's Reference under "Transactions".
This section describes this subjects:
Setting a Column in an SQL Table to Null
Transactions and JDBC
SQL/MP Driver Requirements
Verifying the SQL/MP Driver
JDBC Driver Types
JDBC DriverManager
Loading a Driver
Connecting a Program to a Database
Passing SQL/MP Statements to a Database
Compatible Java and SQL/MP Data Types
Referring to Database Objects
Connection Pooling and the Application Server
Connection Pooling in a Basic DataSource Implementation
Statement Pooling
JDBC/MP Connection-Pooling and Statement-Pooling Properties
Troubleshooting
Sample SQL/MP Program
Setting a Column in an SQL Table to Null
If you want to set a column in a SQL/MP table to null, you must supply a null indicator when you create the update
statement for the table. For example, if a table is defined as:
create table foo( empnum smallint unsigned not null,
lastname character(20) not null,
deptnum smallint unsigned,
primary key (empnum) ) organization key sequenced");
and you want to insert a new foo row and to set deptnum to null (which is permissible because it is not defined as not
null
), you must include a null indicator in the insert statement: