NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.0+)
Contents | Index | Glossary | Prev | Next
Accessing NonStop
TM
SQL/MP Databases
Java
TM
programs interact with Compaq NonStop
TM
SQL/MP databases using the Java Database Connectivity
(JDBC
TM
) API.
The Compaq NonStop
TM
Server for Java includes the following items:
The JDBC 2.0 API●
The JDBC DriverManager in the Java Development Kit (JDK
TM
) 1.2.2●
The following Type 2 drivers, which behave identically, except where the text says otherwise:
The original driver, sqlmp, which communicates with a local SQL/MP database❍
The transaction-aware driver, sqlmptx, which allows you to define transactions outside of JDBC by using
the methods described in Transactions
❍
●
Descriptions of the new features in JDBC 2.0 are found in the "Introduction to NonStop
TM
Server for Java
TM
" Section
under "Enhancements for JDBC
TM
2.0."
To connect a Java program to an SQL/MP database, you must use JDBC DriverManager to load a driver, then use
that driver to connect the program to the database.
This section explains these subjects:
SQL/MP Support for JDBC●
Transactions and JDBC●
SQL/MP Driver Requirements●
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●
Troubleshooting●
Sample SQL/MP Program●
Note:SQL/MP does not conform to the ANSI SQL-92 standard, so SQL/MP drivers are not considered
JDBC compliant; however, you can use SQL/MP drivers and write pure Java programs.
For more information about JDBC, see the JDBC
TM
Data Access API
(http://www.javasoft.com/products/jdbc/index.html).