JDBC/MX 5.0 Driver for SQL/MX Programmer's Reference (SQL/MX 2.x)

Home | Contents | Index | Glossary | Prev | Next
Accessing SQL Databases with SQL/MX
This section describes the following subjects:
Connection to SQL/MX
JdbcRowSet Implementation
JDBC/MX Properties
Transactions
Stored Procedures
SQL Context Management
Holdable Cursors
Connection Pooling
Statement Pooling
Using Additional JDBC/MX Properties
Supported Character Set Encodings
Connection to SQL/MX
A Java application can obtain a JDBC connection to SQL/MX in two ways:
Using the DriverManager class
Using the DataSource interface
Connection Using the DriverManager Class
This is the traditional way to establish a connection to the database. The DriverManager class works with the Driver
interface to manage the set of drivers loaded. When an application issues a request for a connection using the
DriverManager.getConnection method and provides a URL, the DriverManager is responsible for finding a suitable
driver that recognizes this URL and obtains a database connection using that driver.
com.tandem.sqlmx.SQLMXDriver is the JDBC/MX driver class that implements the Driver interface. The application
can load the JDBC/MX driver in one of the following ways, except as noted in the DriverManager Object Properties
table:
Specifying the JDBC/MX driver class in the -Djdbc.drivers option in the command line
Using the Class.ForName method within the application
Adding the JDBC/MX driver class to the jdbc.drivers property within the application
The DriverManager.getConnection method accepts a string containing a JDBC URL. The JDBC URL for the
JDBC/MX driver is jdbc:sqlmx:.
When connecting by using the DriverManager class, use the information in the following topics:
JDBC/MX Driver Properties Used with the DriverManager Class
Guidelines for Using Connections with the DriverManager Class