From derby-user-return-8907-apmail-db-derby-user-archive=db.apache.org@db.apache.org Fri Mar 21 17:17:59 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 24084 invoked from network); 21 Mar 2008 17:17:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Mar 2008 17:17:59 -0000 Received: (qmail 22576 invoked by uid 500); 21 Mar 2008 17:17:56 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 22542 invoked by uid 500); 21 Mar 2008 17:17:55 -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 22531 invoked by uid 99); 21 Mar 2008 17:17:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2008 10:17:55 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.142.206.116] (HELO web33301.mail.mud.yahoo.com) (68.142.206.116) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 21 Mar 2008 17:17:16 +0000 Received: (qmail 77048 invoked by uid 60001); 21 Mar 2008 17:17:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=1mK/OyOn/pZYhhoE5AU+a/mUZzkKOQIxgFFvwjln/MBXN98dbrHKG9ROP6hMAZ8DVr1oTOXbJ65P4lDma2rrw0X2FWyfFrZlf9pUBq6vP0KHus0aEdrx6DCA/n0YW9UtfCd/icwvuZ0vFknXXxAgF+hjQkz+l4NiKMDnZqKUqhk=; X-YMail-OSG: c1ToOvMVM1ke3IdFJJDSjQHe.GwuLfYvsZnh1O8. Received: from [64.194.208.5] by web33301.mail.mud.yahoo.com via HTTP; Fri, 21 Mar 2008 10:17:26 PDT Date: Fri, 21 Mar 2008 10:17:26 -0700 (PDT) From: pflick Subject: Re: Timestamp error To: Derby Discussion In-Reply-To: <47E3D5B1.2000100@amberpoint.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1832610369-1206119846=:75989" Content-Transfer-Encoding: 8bit Message-ID: <344921.75989.qm@web33301.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1832610369-1206119846=:75989 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Brian. That was my problem. Bryan Pendleton wrote: > java.sql.SQLException: Column '0' not found. It sounds like you are calling rs.getString("0"). If you want to get the first column in the result, you should know that columns in the JDBC api are numbered starting at 1: http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#getString(int) Perhaps you should call rs.getString(1) instead. thanks, bryan --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search. --0-1832610369-1206119846=:75989 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks Brian.  That was my problem.


Bryan Pendleton <bpendleton@amberpoint.com> wrote:
> java.sql.SQLException: Column '0' not found.

It sounds like you are calling rs.getString("0"). If you want to get
the first column in the result, you should know that columns
in the JDBC api are numbered starting at 1:
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#getString(int)

Perhaps you should call rs.getString(1) instead.

thanks,

bryan




Looking for last minute shopping deals? Find them fast with Yahoo! Search. --0-1832610369-1206119846=:75989--