Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 66493 invoked from network); 18 Apr 2006 16:50:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Apr 2006 16:50:02 -0000 Received: (qmail 23848 invoked by uid 500); 18 Apr 2006 16:49:56 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 23795 invoked by uid 500); 18 Apr 2006 16:49:56 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 23784 invoked by uid 99); 18 Apr 2006 16:49:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 09:49:56 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of flamefew@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO pproxy.gmail.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 09:49:55 -0700 Received: by pproxy.gmail.com with SMTP id t32so940812pyc for ; Tue, 18 Apr 2006 09:49:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=q8Ukv2ry9Xv0igSx4K8Lkq87ij647nKkEllyW2A9KLawdVgN+b1O/prtmoah+c4+Kl2bFwq8Dn7rdvj6/Sa8Mjs/x5hu9/xwyP3qf/1iLlJTYhYEuEGZhAqbkknC2Q9/wsybrRpjWf2dPrNPLs+N2dXkYJm90eXxP7Hj36D6I9k= Received: by 10.35.50.9 with SMTP id c9mr786549pyk; Tue, 18 Apr 2006 09:49:34 -0700 (PDT) Received: by 10.35.22.15 with HTTP; Tue, 18 Apr 2006 09:49:34 -0700 (PDT) Message-ID: <31cc37360604180949o21a04300g8d9038900203705@mail.gmail.com> Date: Tue, 18 Apr 2006 09:49:34 -0700 From: "Henri Yandell" To: "Jakarta Commons Users List" Subject: Re: [commons-dbutils-1.1-dev] QueryRunner#fillStatement - Problem with java.util.Date objects In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 4/18/06, Jayant K Das wrote: > Hi, > > I am using the QueryRunner of 1.1-dev which has handled the setNull > property, but there probably remains a problem, if the param contains a > java.util.Date object, in that case setObject() won't work directly, rath= er > it needs to be changed to java.sql.Date, in this context I have a questio= n > that whether this conversion should be handled by the QueryRunner or it > should be the responsibility of the user to fill the appropriate data typ= e > before calling the method? It would be nice, but the problem is in what to change it to. You'd like java.sql.Date; I'd like java.sql.Timestamp and sometimes I'd like it to be oracle.sql.TIMESTAMP to deal with bugs there. So in the end dbutils can't get it right. I wonder how bad it'd be to have it throw an Exception when a java.util.Date is passed in - fail fast not late. What do you think? Hen --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org