By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

DB2 8.2 JDBC Application --> CHARACTER and CHAR

P: n/a
Hi Everyone,

We recently migrated our database server from DB2 6.1 FP11 windows to
8.2 FP 8 windows. The migration was successful, without showing any
signs of failure of any sort.

We have a jdbc application which interacts with the db2 8.2 (ESE
windows) database through a DB2 6.1 windows Client.

Java Version --> JDK 1.4.2_07

In my application, I am using the following method to retrieve a
specific column's (CHAR based column) SQL datatype from the database:

ResultSetMetaData rsmd --> rsmd.getColumnTypeName(int column_number)
Earlier, when my client and server were both on 6.1, and whenever I was
executing the above method, it was returning the column datatype as
'CHARACTER'.

Now, ever since we migrated our server to 8.2, whenever we try to
execute the above method using a DB2 8.2 FP 8 client, that column's
datatype is retreived by JDBC as 'CHAR' and not 'CHARACTER'. The same
method still works as we expect it to be, when we use the DB2 6.1
client to connect to the database.

Any pointers on how to correct this?

regards,
dotyet

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
dotyet wrote:
Hi Everyone,

We recently migrated our database server from DB2 6.1 FP11 windows to
8.2 FP 8 windows. The migration was successful, without showing any
signs of failure of any sort.

We have a jdbc application which interacts with the db2 8.2 (ESE
windows) database through a DB2 6.1 windows Client.

Java Version --> JDK 1.4.2_07

In my application, I am using the following method to retrieve a
specific column's (CHAR based column) SQL datatype from the database:

ResultSetMetaData rsmd --> rsmd.getColumnTypeName(int column_number)
Earlier, when my client and server were both on 6.1, and whenever I was
executing the above method, it was returning the column datatype as
'CHARACTER'.

Now, ever since we migrated our server to 8.2, whenever we try to
execute the above method using a DB2 8.2 FP 8 client, that column's
datatype is retreived by JDBC as 'CHAR' and not 'CHARACTER'. The same
method still works as we expect it to be, when we use the DB2 6.1
client to connect to the database.

Any pointers on how to correct this?

regards,
dotyet

CHAR and CHARACTER are synonyms. So it isn't broken.
Is the change a major issue for you? Just trying to find out whether
there is a problem or mere confusion.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

P: n/a
i understand that they are both the same. however my application is
currently looking for 'CHARACTER' and not 'CHAR'. So, if there is no
work around, then I am forced to make changes through the application
code, which will be a bit painful.
regards,
dotyet

Serge Rielau wrote:

CHAR and CHARACTER are synonyms. So it isn't broken.
Is the change a major issue for you? Just trying to find out whether
there is a problem or mere confusion.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.