Closed GoogleCodeExporter closed 8 years ago
OK I reverted back to Version 1.0.75 (2008-07-14) and it works again. FYI none
of
the 1.1.xxxx builds work.
The database storage is on the filesystem and I'm accessing it with
org.h2.Driver and
this JDBC URL...
jdbc:h2:/home/pjr/temp/H2database
Is there a compatibility issue between 1.1.xxx and 1.0.xxx ?
Original comment by peter.ro...@gmail.com
on 12 May 2009 at 4:09
More details. I tried connecting with the h2.sh db tool lastest 2009-05-01
connecting to the existing DB with same URL connection. Same JVM etc. In this
environment it works correctly.
Let me know what I can do to try to corner this.
Original comment by peter.ro...@gmail.com
on 12 May 2009 at 4:27
Hi,
This was changed in version version 1.1.101 (2008-10-17), see
http://www.h2database.com/html/changelog.html "For alias columns,
ResultSetMetaData.getTableName() and getColumnName() now return the real table
and
column name in the default mode."
This is how MySQL works, and I believe it's compliant with the JDBC standard.
See:
http://java.sun.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getColumnL
abel(int)
http://java.sun.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getColumnN
ame(int)
You can change it using a compatibility mode (MODE=...):
http://www.h2database.com/html/features.html#compatibility
or by setting the system property h2.aliasColumnName to true:
http://www.h2database.com/javadoc/org/h2/constant/SysProperties.html#h2.aliasCol
umnName
Regards,
Thomas
Original comment by thomas.t...@gmail.com
on 16 May 2009 at 9:03
Thank you very much. This is exactly the problem - our ResultSet handling code
was
assuming the getColumnName would work correctly. Funny this is working for
Postgres
and MySQL and the earlier generation of H2. But thanks for 'doing the right
thing'
with a correct implementation and hopefully our code is also now spec complient.
Thanks also for the hard work on H2 - its great!
Original comment by peter.ro...@gmail.com
on 16 May 2009 at 4:25
I am now closing this issue as 'wont fix'.
Original comment by thomas.t...@gmail.com
on 21 May 2009 at 4:42
Original issue reported on code.google.com by
peter.ro...@gmail.com
on 12 May 2009 at 3:49