SQL/MX Programming Manual for Java
Contents
HP NonStop SQL/MX Programming Manual for Java—523726-003
ii
2. Getting Started
2. Getting Started
Software Requirements 2-1
SQLJ Product File 2-1
NonStop Server for Java 2-2
JDBC/MX Driver 2-2
Verifying Software Versions 2-2
Verifying the SQLJ Product 2-2
Verifying the NonStop Server for Java 2-3
Verifying the JDBC/MX Driver 2-3
Configuring the Java Environment 2-4
Setting the JREHOME Environment Variable 2-4
Setting the Class Path 2-4
Establishing Java Security 2-6
3. SQLJ Programming
Basic Elements of an SQLJ Program 3-1
SQLJ Source File 3-1
SQLJ Clause 3-1
Comments 3-3
Naming Restrictions and Reserved Words 3-4
Code Initialization 3-4
Specifying the Java Package of an SQLJ Program 3-4
Importing Java Packages 3-5
Registering and Loading the JDBC/MX Driver 3-6
Connection Contexts 3-8
Implicit Connection Contexts 3-8
Explicit Connection Contexts 3-8
Execution Contexts 3-20
Implicit Execution Contexts 3-20
Explicit Execution Contexts 3-20
Execution Context Methods 3-22
Multithreading 3-23
Coding a Multithreaded SQLJ Program 3-23
Nonblocking JDBC/MX (Nowait SQL) 3-26
Host Variables and Expressions 3-27
Input and Output Modes 3-27
Host Variables 3-28
Host Expressions 3-30