Sqlj Differences Between The Ibm Data Server Driver For Jdbc And Sqlj And Other Db2 Jdbc Drivers - IBM DB2 Manual

Table of Contents

Advertisement

The following table lists the ResultSetMetaData.getColumnName and
ResultSetMetaData.getColumnName values that are returned for the query.
Table 89. ResultSetMetaData.getColumnName and ResultSetMetaData.getColumnName before and after IBM Data
Server Driver for JDBC and SQLJ Version 4.0 for a table column with a LABEL ON statement in a query with no AS
CLAUSE
Behavior before IBM Data Server Driver for
JDBC and SQLJ Version 4.0
getColumnName
Target data source
value
DB2 for z/OS Version
MYCOL
8 or later, and DB2
UDB for i5/OS V5R3
and later
DB2 for z/OS Version
MYCOL
7, and DB2 UDB for
i5/OS V5R2
SQLJ differences between the IBM Data Server Driver for JDBC and
SQLJ and other DB2 JDBC drivers
There are a number of differences between the IBM Data Server Driver for JDBC
and SQLJ and the older JDBC drivers. When you move to the IBM Data Server
Driver for JDBC and SQLJ, you need to modify your SQLJ programs to account for
those differences.
Important: The JDBC/SQLJ Driver for OS/390 and z/OS is no longer supported.
This information is provided only to help you diagnose problems in your
applications after migration to the IBM Data Server Driver for JDBC and SQLJ.
SQLJ support in the IBM Data Server Driver for JDBC and SQLJ differs from SQLJ
support in the other DB2 JDBC drivers in the following areas:
Connection associated with the default connection context
With SQLJ, it is possible, although not recommended, to let the driver implicitly
establish a connection to a data source, and to execute SQL under that implicitly
established connection. An application does this by omiting code that obtains a
connection and by omiting connection context objects from SQLJ executable
clauses. For an application that is written for the JDBC/SQLJ Driver for OS/390
and z/OS, the result is unambiguous because there is only one type of connectivity
(type 2), and there is a single default data source (the local location). However,
with the IBM Data Server Driver for JDBC and SQLJ, there are multiple ways to
make a connection. If you do not explicitly specify the connectivity type and the
data source, the SQLJ runtime code cannot determine how to make the connection.
One way to solve the problem, without modifying your applications, is to define a
DataSource named jdbc/defaultDataSource and register that DataSource with a
JNDI provider. That DataSource needs to have all the information that is required
to make a connection. If you use WebSphere Application Server, you can use the
JNDI service that is provided by WebSphere Application Server.
getColumnLabel
value
LABELONCOL
LABELONCOL
Related reference
"JDBC differences between versions of the IBM Data Server Driver for JDBC
and SQLJ" on page 376
Behavior for IBM Data Server Driver for
JDBC and SQLJ Version 4.0
getColumnName
value
MYCOL
MYLABEL
Chapter 7. JDBC and SQLJ reference information
getColumnLabel
value
MYCOL
LABELONCOL
381

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents