Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 4984 invoked from network); 1 Aug 2002 18:12:17 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 1 Aug 2002 18:12:17 -0000 Received: (qmail 13019 invoked by uid 97); 1 Aug 2002 18:11:22 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 12987 invoked by uid 97); 1 Aug 2002 18:11:21 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 12958 invoked by uid 98); 1 Aug 2002 18:11:21 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <003f01c23986$a16002a0$4400a8c0@backdraft> From: "Michael Locasto" To: "Tomcat Users List" References: Subject: Re: DB2 and servlet ??? Help !!! Date: Thu, 1 Aug 2002 14:09:51 -0400 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, Assuming this is the SQL you want to submit: > > try{ > stmt = con.createStatement(); > rs = stmt.executeQuery("SELECT empno from > db2admin.employee"); shouldn't it be if( rs.next() ){ do{ count++; out.println( " empno is "+rs.getString( 1 ) ); }while( rs.next() ); } or something along those lines? (rather than the !rs.next() ) > > try{ > if(!rs.next()) > { > count = count +1; > String a = rs.getString(1); > > out.println(" empno is " + a ); > out.println("

While Count is"+ count); > } -- To unsubscribe, e-mail: For additional commands, e-mail: