Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 71995 invoked from network); 10 Feb 2005 15:05:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Feb 2005 15:05:26 -0000 Received: (qmail 86901 invoked by uid 500); 10 Feb 2005 15:05:24 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 86878 invoked by uid 500); 10 Feb 2005 15:05:24 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 86862 invoked by uid 99); 10 Feb 2005 15:05:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from stingray.uchicago.edu (HELO stingray.uchicago.edu) (128.135.17.223) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 10 Feb 2005 07:05:22 -0800 Received: from skate (skate.uchicago.edu [128.135.17.227]) by stingray.uchicago.edu (8.12.7/8.12.7/SuSE Linux 0.6) with SMTP id j1AF5J5G015659 for ; Thu, 10 Feb 2005 09:05:19 -0600 Message-ID: <000a01c50f81$ee9fb910$e3118780@skate> From: "Jonathan Eric Miller" To: "Derby Discussion" References: <001801c50ef2$a3d92a40$e3118780@skate> <420A8D47.7090801@Sourcery.Org> <001e01c50ef8$d70dc7d0$e3118780@skate> <420AA24F.4070508@Sourcery.Org> Subject: Re: JDBC driver error codes documentation, where? Date: Thu, 10 Feb 2005 09:05:17 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Great, I'll give it a try, thanks! Jon ----- Original Message ----- From: "Satheesh Bandaram" To: "Derby Discussion" Sent: Wednesday, February 09, 2005 5:52 PM Subject: Re: JDBC driver error codes documentation, where? > Yes, you can use that property when you get a connection. Use a URL like: > 'jdbc:derby:net://localhost:1527/tdb:retrieveMessagesFromServerOnGetMessage=true;user=junk;password=junk;'; > > Any SQLExceptions on that connection should show the message. You don't > have to do anything else extra. > > Satheesh > > Jonathan Eric Miller wrote: > >> That looks like a much better error message. Thanks! >> >> What I'm wondering now though, is, is there an equivalent property to >> the JDBC driver itself? Normally, with the other JDBC drivers that >> I've been using (MySQL, MSSQL, Sybase, PostgreSQL, Oracle), it was >> sufficient to just do an Exception.printStackTrace() to get a >> meaningful text message of what went wrong for a SQLException. I'm >> wondering if I'm still going to have to do more than that when using >> the Derby driver? Personally, I think it should print out descriptive >> text by default. >> >> Jon >> >> ----- Original Message ----- From: "Satheesh Bandaram" >> >> To: "Derby Discussion" >> Sent: Wednesday, February 09, 2005 4:23 PM >> Subject: Re: JDBC driver error codes documentation, where? >> >> >>> You can get the error messages using property >>> retrieveMessagesFromServerOnGetMessage, which defaults to FALSE. >>> >>> 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 >>> >>> >>> >> >> >