JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.2.1

Contents
About this document......................................................................................7
Product Version........................................................................................................................7
Supported Release Version Updates (RVUs)..................................................................................7
Audience.................................................................................................................................7
New and Changed Information..................................................................................................7
Document Organization............................................................................................................7
Related Documentation..............................................................................................................8
Type 4 Driver APIs................................................................................................................8
NonStop System Computing Documents..................................................................................9
Notation Conventions..............................................................................................................11
Publishing History...................................................................................................................12
HP Encourages Your Comments................................................................................................13
1 Introduction to HP NonStop JDBC Type 4 Driver...........................................14
Type 4 Driver API Package.......................................................................................................14
Type 4 Driver Architecture........................................................................................................14
Client Platforms Supported..................................................................................................14
Accessing a Database with the Type 4 Driver........................................................................14
Samples................................................................................................................................15
2 Installing and Verifying the Type 4 Driver.....................................................16
Prerequisites...........................................................................................................................16
Installing the JDBC/MX Type 4 Driver........................................................................................16
Product Files...........................................................................................................................17
Setting CLASSPATH.................................................................................................................17
Verifying the Type 4 Driver.......................................................................................................18
3 Accessing SQL Databases with SQL/MX.....................................................19
Communication Overview........................................................................................................19
Data Sources.........................................................................................................................20
JDBC Data Source (client-side).............................................................................................20
MXCS Data Source (server-side)...........................................................................................20
Security.................................................................................................................................20
Connecting to SQL/MX...........................................................................................................21
Connecting with the DataSource Interface.............................................................................21
Connecting using the DriverManager Class...........................................................................23
Stored Procedures...................................................................................................................25
Connection Pooling.................................................................................................................25
Statement Pooling...................................................................................................................26
Guidelines for Statement Pooling..........................................................................................26
Troubleshooting Statement Pooling.......................................................................................26
Thread-safe SQL/MX Access....................................................................................................27
"Update ... Where Current of" Operations.................................................................................27
Internationalization (I18N) Support...........................................................................................28
String Literals Used in Applications.......................................................................................28
Controlling String Literal Conversion by Using the Character-Set Properties.................................28
Trimming Padding for Fixed-Length Character Columns............................................................30
Localizing Error Messages and Status Messages....................................................................31
4 Type 4 Driver Properties............................................................................33
Overview of the Type 4 Driver Properties...................................................................................34
Client-Side Properties..........................................................................................................34
Server-Side Properties.........................................................................................................36
Contents 3