From derby-dev-return-71828-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Tue Aug 04 14:18:54 2009 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 85085 invoked from network); 4 Aug 2009 14:18:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Aug 2009 14:18:54 -0000 Received: (qmail 18880 invoked by uid 500); 4 Aug 2009 14:18:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 18820 invoked by uid 500); 4 Aug 2009 14:18:59 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 18804 invoked by uid 99); 4 Aug 2009 14:18:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2009 14:18:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.82.107.6] (HELO red.amberpoint.com) (63.82.107.6) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2009 14:18:50 +0000 Received: from [127.0.0.1] (bp-laptop.edgility.com [10.10.12.207]) by red.amberpoint.com (8.13.8/8.13.8) with ESMTP id n74EITS2017769 for ; Tue, 4 Aug 2009 07:18:29 -0700 Message-ID: <4A784334.5020300@amberpoint.com> Date: Tue, 04 Aug 2009 07:18:28 -0700 From: Bryan Pendleton User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: problem with cast (null as int) References: <316d38e80908021129y3c1d4d8ay8be3b2350f6f5be2@mail.gmail.com> <316d38e80908030912k6b619f52jc8fd88f90f708208@mail.gmail.com> <316d38e80908031210p5a5eee7fx454710714c5c29ac@mail.gmail.com> <316d38e80908031415ibfe81c1j555838eb76edf075@mail.gmail.com> <316d38e80908032156i286d0cb6n46ac169094e1a757@mail.gmail.com> In-Reply-To: <316d38e80908032156i286d0cb6n46ac169094e1a757@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 Eranda Sooriyabandara wrote: > when execution time it gave the NullPointerException. We cannot directly > cast the null into Integer ((INTEGER)rs.getObject(i)). But we can do it > by give the data type as integer, pSt.setObject(i, rs.getObject(i), Types.INTEGER); > Am I correct in understanding? Yes, exactly so! thanks, bryan