提交 1e46ae2c authored 作者: Thomas Mueller's avatar Thomas Mueller

The H2 Console tool now works with the JDBC-ODBC bridge.

上级 c21156ff
......@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>The Console tool now supports command line options to start things separately.
<ul><li>The H2 Console tool now works with the JDBC-ODBC bridge.
</li><li>The H2 Console tool now supports command line options to start things separately.
</li><li>Large objects did not work for in-memory databases in server mode in Linux.
</li><li>Connections from a local address other than 'localhost' were not allowed if remote
connections were disabled. This was always a problem, but only got visible in the last release
......
......@@ -28,9 +28,16 @@ class DbColumn {
String dataType;
DbColumn(ResultSet rs) throws SQLException {
int indexColumnSize = 7;
try {
indexColumnSize = rs.findColumn("COLUMN_NAME");
} catch (SQLException e) {
// ignore
// workaround for a JDBC-ODBC bridge problem
}
name = rs.getString("COLUMN_NAME");
String type = rs.getString("TYPE_NAME");
int size = rs.getInt("COLUMN_SIZE");
int size = rs.getInt(indexColumnSize);
if (size > 0) {
type += "(" + size;
int prec = rs.getInt("DECIMAL_DIGITS");
......
......@@ -122,8 +122,15 @@ public class DbContents {
}
ResultSet rs = meta.getSchemas();
ArrayList schemas = new ArrayList();
int index = 1;
try {
index = rs.findColumn("TABLE_SCHEM");
} catch (SQLException e) {
// ignore
// workaround for a JDBC-ODBC bridge problem
}
while (rs.next()) {
String schema = rs.getString("TABLE_SCHEM");
String schema = rs.getString(index);
if (schema == null) {
continue;
}
......
......@@ -1994,8 +1994,14 @@ class WebThread extends Thread implements DatabaseEventListener {
buff.append("</tr>");
}
}
boolean isUpdatable = rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE
boolean isUpdatable = false;
try {
isUpdatable = rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE
&& rs.getType() != ResultSet.TYPE_FORWARD_ONLY;
} catch (NullPointerException e) {
// ignore
// workaround for a JDBC-ODBC bridge problem
}
if (edit) {
ResultSet old = session.result;
if (old != null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论