2009/3/8 Jezzper <[email protected]>:
>
> Hi
>
> I have used the H2 console against a Firebird database and the queries
> worked well.
>
> I have now ported the database to H2 (because it is much much
> faster).
>
> When I now do the (any) simple selects like "Select * from weblogdata"
> I get an error:
>
> Column CONSTRAINT_NAME not found; SQL statement:
> SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM, TABLE_NAME,
> COLUMN_NAME, ORDINAL_POSITION KEY_SEQ, IFNULL(CONSTRAINT_NAME,
> INDEX_NAME) PK_NAME FROM INFORMATION_SCHEMA.INDEXES WHERE
> TABLE_CATALOG LIKE ? AND TABLE_SCHEMA LIKE ? AND TABLE_NAME = ? AND
> PRIMARY_KEY = TRUE ORDER BY COLUMN_NAME [42122-108] 42S22/42122 (Help)
> org.h2.jdbc.JdbcSQLException: Column CONSTRAINT_NAME not found; SQL
> statement:
> SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM, TABLE_NAME,
> COLUMN_NAME, ORDINAL_POSITION KEY_SEQ, IFNULL(CONSTRAINT_NAME,
> INDEX_NAME) PK_NAME FROM INFORMATION_SCHEMA.INDEXES WHERE
> TABLE_CATALOG LIKE ? AND TABLE_SCHEMA LIKE ? AND TABLE_NAME = ? AND
> PRIMARY_KEY = TRUE ORDER BY COLUMN_NAME [42122-79]
>    at org.h2.message.Message.getSQLException(Message.java:103)
>    at org.h2.message.Message.getSQLException(Message.java:114)
>    at org.h2.message.Message.getSQLException(Message.java:77)
>    at org.h2.expression.ExpressionColumn.optimize
> (ExpressionColumn.java:130)
>    at org.h2.expression.Function.optimize(Function.java:1568)
>    at org.h2.expression.Alias.optimize(Alias.java:48)
>    at org.h2.command.dml.Select.prepare(Select.java:710)
>    at org.h2.command.Parser.prepareCommand(Parser.java:233)
>    at org.h2.engine.Session.prepareLocal(Session.java:285)
>    at org.h2.server.TcpServerThread.process(TcpServerThread.java:211)
>    at org.h2.server.TcpServerThread.run(TcpServerThread.java:127)
>    at java.lang.Thread.run(Unknown Source)
>
>    at org.h2.engine.SessionRemote.done(SessionRemote.java:525)
>    at org.h2.command.CommandRemote.prepare(CommandRemote.java:70)
>    at org.h2.command.CommandRemote.<init>(CommandRemote.java:48)
>    at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:
> 420)
>    at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:
> 1045)
>    at org.h2.jdbc.JdbcPreparedStatement.<init>
> (JdbcPreparedStatement.java:72)
>    at org.h2.jdbc.JdbcConnection.prepareAutoCloseStatement
> (JdbcConnection.java:238)
>    at org.h2.jdbc.JdbcDatabaseMetaData.getPrimaryKeys
> (JdbcDatabaseMetaData.java:355)
>    at org.h2.result.UpdatableRow.<init>(UpdatableRow.java:84)
>    at org.h2.jdbc.JdbcResultSet.getConcurrency(JdbcResultSet.java:
> 2396)
>    at org.h2.server.web.WebThread.getResultSet(WebThread.java:2008)
>    at org.h2.server.web.WebThread.getResult(WebThread.java:1744)
>    at org.h2.server.web.WebThread.query(WebThread.java:1286)
>    at org.h2.server.web.WebThread.process(WebThread.java:444)
>    at org.h2.server.web.WebThread.processRequest(WebThread.java:186)
>    at org.h2.server.web.WebThread.process(WebThread.java:241)
>    at org.h2.server.web.WebThread.run(WebThread.java:196)
>
> I am not sure why I get this error since. Any help?

Hi Jesper,

Could you specify how you "ported" your Firebird db to H2 and also how
you db is laid out?

Cheers,
Mikkel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to