Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 90149 invoked from network); 8 Mar 2007 03:54:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2007 03:54:19 -0000 Received: (qmail 58212 invoked by uid 500); 8 Mar 2007 03:54:26 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 58180 invoked by uid 500); 8 Mar 2007 03:54:26 -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 58169 invoked by uid 99); 8 Mar 2007 03:54:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 19:54:26 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: 32.97.182.141 is neither permitted nor denied by domain of Stan.Bradbury@gmail.com) Received: from [32.97.182.141] (HELO e1.ny.us.ibm.com) (32.97.182.141) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2007 19:54:16 -0800 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l283rtDw025185 for ; Wed, 7 Mar 2007 22:53:55 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l283rshW310918 for ; Wed, 7 Mar 2007 22:53:54 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l283rsW0020351 for ; Wed, 7 Mar 2007 22:53:54 -0500 Received: from [127.0.0.1] (sig-9-76-207-126.mts.ibm.com [9.76.207.126]) by d01av01.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l283rqSb020324 for ; Wed, 7 Mar 2007 22:53:54 -0500 Message-ID: <45EF88C9.8090805@gmail.com> Date: Wed, 07 Mar 2007 19:53:45 -0800 From: Stanley Bradbury User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Question about Working With Derby Manual, v10.2 References: <34a2cd6f0703071755h7b3a5f6dpbb089240cd3cfb2d@mail.gmail.com> In-Reply-To: <34a2cd6f0703071755h7b3a5f6dpbb089240cd3cfb2d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org John (john@foobox.com) wrote: > I'm working on Activity 3 of the Working With Derby manual (v10.2 - > doc build March 6, 2007, 8:31:05 PM PST). > > I'm playing around with the WwwEmbedded.java class and am running into > some problems. I can get the program running per the instructions on > pages 17 and 18 of the manual. If I enter a "wished item" greater than > 32 characters, an exception is thrown (per the note on page 21). My > assumption is that this maximum length constraint is due to line 50 of > WwwEmbedded.java in which the length of the WISH_ITEM varchar is > defined to have a maximum length of 32. I changed this length to a > much higher value (e.g., 256) but after recompiling and rerunning, I > still have the maximum constraint of 32 characters. Is this correct? > Is this due to an inherent constraint on java.sql.PreparedStatement? > Your help is appreciated. > > Thanks, > John > > -- > -------------------------------------- > Be conscious of life > john@foobox.com Hi John - The exception is an SqlException which comes from Derby. The problem is that the column of the table is varchar(32). In addition the the change you made you will need to recreate the underlying table with a larger column size to allow for larger values.