Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

JDBC Driver Versions

There was a change in the usage of getColumnLabel and getColumnName in the JDBC drivers version 4.0 and later.

This has e.g. impact for SQL queries with an alias for the fieldname like:

SELECT column AS aliasName from table

With JDBC drivers vesion 4.0 and later you will not get the aliasName.


PDI-2905 is adressing this issue,
see also http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.java/com.ibm.db2.luw.apdv.java.doc/doc/c0052593.htm
"[...] for JDBC and SQLJ version 4.0 and later, the default behavior of ResultSetMetaData.getColumnName and ResultSetMetaData.getColumnLabel differs from the default behavior for earlier JDBC drivers. You can use the useJDBC4ColumnNameAndLabelSemantics property to change this behavior."

At a test we were not able to change this behaviour by the property useJDBC4ColumnNameAndLabelSemantics and were not able to get the aliasName.
Also the behaviour is different depending on the operating system DB2 runs on.

  • No labels