Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A1D578CA for ; Wed, 20 Jul 2011 21:38:03 +0000 (UTC) Received: (qmail 38856 invoked by uid 500); 20 Jul 2011 21:38:03 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 38810 invoked by uid 500); 20 Jul 2011 21:38:02 -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 38803 invoked by uid 99); 20 Jul 2011 21:38:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 21:38:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.138.91.131] (HELO nm1-vm3.bullet.mail.ne1.yahoo.com) (98.138.91.131) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Jul 2011 21:37:53 +0000 Received: from [98.138.90.57] by nm1.bullet.mail.ne1.yahoo.com with NNFMP; 20 Jul 2011 21:37:32 -0000 Received: from [98.138.87.7] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 20 Jul 2011 21:37:32 -0000 Received: from [127.0.0.1] by omp1007.mail.ne1.yahoo.com with NNFMP; 20 Jul 2011 21:37:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 443010.25678.bm@omp1007.mail.ne1.yahoo.com Received: (qmail 35205 invoked by uid 60001); 20 Jul 2011 21:37:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1311197852; bh=X1Ys+3vRCCD03135SRvfKOoX/OwK4MC7FeqvFylDFmw=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=veZhYd2iajLnHql9sz3Ckxsv9tRni+AEUV9iT/pCxkN//ITb61SCi7NMILg0SViOZdXW59OCHxm55nQC+p5BSohJhnBxpc16JczW6DE3NKnt2dmOzCCyl915H1AWVBm8UU0sRZYGPBEkfA+HGyFUMa3Ye52HHuiApC+KMivKiEs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BW0LhtvLsw3jGhplKxMBb6HTkrpdCcl63T1HDAqz9vaYM/lkrGC2jYezFt4VoYamUBhZvQmMDqe04lKloWEyueuYH+MVijJjRVqurwd4s9H8RJlx9+dTl9t/DuVJ7xNJtabi0K+rQ7bUIkkirNmygE9H6fBm7jFLlW6pVpU/vaY=; X-YMail-OSG: g5vFOvwVM1lNEOgqtEhmtZOdj2s7TSFy2LtpK4ytFpkncD5 qufGfsFGn4Lwa8rkZVAC0oP3XBo8bResIff4zvFhePJUFPKoldGuutKbeaDo L86r1aPtnnBUNke.CGnCEmfwLq0Fz.Sg.WLBxRpb.hjTNGfCjb2H7NwkAgPX G1X5SvCyzf2k4HcLtvGw_rh5q.lAmpmFQfPlz8IOzK08QbC1V61oqhuyl48D 3wuU6i2t63HVr108mWi2gK7MJFe8JgAsDngxTOvagDDK323lWC1V1aR8NU5W F2lHd.J0Rcpb1L8QC2JDgZLef_IFGeHZcMgwFVDUH21a.iIWCfS1mc15Nj7P PmiGKODT3P9wtrC3sBcwaowK49sKB50cPHEal07xdCuMqBlOUA8e9iHUlNK7 8qSwgXA-- Received: from [98.138.197.88] by web125402.mail.ne1.yahoo.com via HTTP; Wed, 20 Jul 2011 14:37:32 PDT X-Mailer: YahooMailWebService/0.8.112.307740 References: <1311129765.48826.YahooMailNeo@web125418.mail.ne1.yahoo.com> Message-ID: <1311197852.35165.YahooMailNeo@web125402.mail.ne1.yahoo.com> Date: Wed, 20 Jul 2011 14:37:32 -0700 (PDT) From: Tomcat Programmer Reply-To: Tomcat Programmer Subject: Re: nulls in prepared statement To: Derby Discussion In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =0A=0A>=0A> You must explicitly set value to null:=0A>=0A> if (cobj.getPart= No()=3D=3Dnull) pstmt.setNull(1, java.sql.Types.VARCHAR);=0A> else pstmt.se= tString(1,cobj.getPartNo());=0A>=A0=0A=0AHi Peter, thanks for responding bu= t I am aware of this as I indicated in my post. You realize how tedious thi= s will be with any significant number of fields? =A0What I am asking about = is if there is an alternate solution. =A0=0A=0AThanks in advance,=A0=0ATC