EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #397 background imageLoading...
Page #397 background image
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
Target data source
Behavior before IBM Data Server Driver for
JDBC and SQLJ Version 4.0
Behavior for IBM Data Server Driver for
JDBC and SQLJ Version 4.0
getColumnName
value
getColumnLabel
value
getColumnName
value
getColumnLabel
value
DB2 for z/OS Version
8 or later, and DB2
UDB for i5/OS V5R3
and later
MYCOL LABELONCOL MYCOL MYCOL
DB2 for z/OS Version
7, and DB2 UDB for
i5/OS V5R2
MYCOL LABELONCOL MYLABEL LABELONCOL
Related reference
“JDBC differences between versions of the IBM Data Server Driver for JDBC
and SQLJ” on page 376
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.
Chapter 7. JDBC and SQLJ reference information 381

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability