MaxDB 7.7 and JDBC
Posted by rajg on September 10, 2008
With new kernel version MaxDB 7.7 is complaint with JDBC driver specification. Due to this change (or lets say correction from MaxDB ) my application running perfectly fine with MaxDb 7.6 was not running properly with MaxDB 7.7 kernel and the new JDBC driver.
In fact my application was using the misbehavior designed in previous versions of MAxDB. Method ResultSetMetaData.getCoulmnName was returning the label/alias defined in SQL rather than the column name defined in the table. My result set parsing algorithm was based on the label/alias defined in SQL which was fetched by ResultSetMetaData.getCoulmnName. Since this has been corrected in MaxDB 7.7 my algorithm did not work as expected as the method call ResultSetMetaData.getCoulmnName gave me the column name (which is the correct behavior). To fix my parser I had to call ResultSetMetaData.getLabelName to get the alias/label defined in SQL.
For example, if the query is:
SELECT X AS Y FROM DUAL
With MaxDB 7.6 ResultSetMetaData.getCoulmnName(1) returned "Y" while MaxDB 7.7 returned "X".