Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
JDBC driver v7.6: UNION ALL corrupts ResultSet

JDBC driver v7.6: UNION ALL corrupts ResultSet

2006-07-20       - By Donatas Ciuksys

 Back
Reply:     1     2     3  

Hi,

I have SQL that uses UNION ALL, and all the 7.6 JDBC drivers that I have
tried through this:

com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: Cannot convert VDN number
[00000000000000000000000000000000000000c1].
  at
com.sap.dbtech.util.VDNNumber.number2BigDecimal(VDNNumber.java:243)
  at com.sap.dbtech.util.VDNNumber.number2long(VDNNumber.java:363)
  at
com.sap.dbtech.jdbc.translators.NumericTranslator.getLong(NumericTranslator.
java:232)
  at
com.sap.dbtech.jdbc.translators.NumericTranslator.getInt(NumericTranslator.j
ava:209)
  at
com.sap.dbtech.jdbc.ResultSetSapDB.getInt(ResultSetSapDB.java:1107)
  at
org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.j
ava:236)

Well the problem is not number format in DB (I spent a lot of time till I
clarified this) - problem is that v7.6 JDBC drivers mess up ResultSet
somehow. Everything is working OK with v7.5.01 JDBC driver
(sapdbc-7 (See http://dbc-7.ora-code.com)_5_01_00.jar).

This is what DBVisualizer shows in its Debug window:

02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] Error getting value for row/col 34/14
(ISGNEPILNAMECIU): com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: Cannot
convert VDN number [0061006c0069007a006100630069006a006f0073].
02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] ... switching to getObject()
02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] Error getting value for row/col 34/14:
com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: Cannot convert VDN number
[0061006c0069007a006100630069006a006f0073].
02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] Error getting value for row/col 35/4 (KIEK):
com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: Cannot convert VDN number
[000000000000].
02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] ... switching to getObject()
02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] Error getting value for row/col 35/4:
com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: Cannot convert VDN number
[000000000000].
02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] Error getting value for row/col 35/13
(PRAITIISGNEPILNAMECIU): com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB:
Cannot convert VDN number [00000000000000c23600000100560079006b0069].
02:42:10 [ERROR Thread-11 (See http://ead-11.ora-code.com) E.?] ... switching to getObject()
...
... and so on many times more...
...

With older (7.5) JDBC driver there are no problems - I get result without
exceptions (grid with one column as VARCHAR, and others as numbers). But
with 7.6 (even the latest one from 7.6.00.32) I get squares, question marks,
etc. (as DBVisualizer possibly switches from getInt() to getObject()).

So, I can use the old driver, but question is following - are all the 7.6
drivers broken with respect to UNION ALL? And why this is driver dependent -
UNION is executed on the server side, JDBC driver should just get ResultSet?

Regards,
Donatas


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)