You can get the error messages using property
retrieveMessagesFromServerOnGetMessage, which defaults to FALSE.
<satheesh> java -Dij.retrieveMessagesFromServerOnGetMessage=true
org..apache.derby.tools.ij
ij> connect 'jdbc:derby://localhost:1527/tdb' user 'junk' password
'junk';
ij> INSERT INTO Item (name) VALUES ("Panasonic DVD Player");
ERROR 42X04: Column 'Panasonic DVD Player' is not in any table in the
FROM list or it appears within a join specification and is outside the
scope of the join specification or it appears in a HAVING clause and is
not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement
then 'Panasonic DVD Player' is not a column in the target table.
ij>
IBM actually announced contributing source code for JDBC driver by
around March 2005. I think we should make this property default to TRUE
in Apache driver, if and when it is accepted by the community.
Satheesh
Jonathan Eric Miller wrote:
Does
anyone know where the error codes are listed for the JDBC driver?
The following is the error I get in ij if I accidentally use double
quotes instead of single quotes. Why oh why doesn't IBM's JDBC driver
print intelligible error messages? I can live with it as long as there
is documentation somewhere that maps the error codes into descriptive
text, but, where is it?
Any news on IBM turning over the source code for the JDBC driver?
ij> INSERT INTO Item (name) VALUES ("Panasonic DVD Player");
ERROR 42X04: DB2 SQL error: SQLCODE: -1, SQLSTATE: 42X04, SQLERRMC:
Panasonic DV
D Player¶42X04
ij> INSERT INTO Item (name) VALUES ('Panasonic DVD Player');
1 row inserted/updated/deleted
Jon