Article View: borland.public.jbuilder.java.api
Article #856why my Resultset does not return result ?
From: andy
Date: Wed, 09 Oct 2002 09:12
Date: Wed, 09 Oct 2002 09:12
30 lines
1717 bytes
1717 bytes
hai,
i have a code like this:
String SQLQuery = "Select memberID from Member where "+
"Member_Name='"+Login.toLowerCase()+"' and Member_pass ='
"+Password.toLowerCase()+"'";
ResultSet rs = stmt.executeQuery(SQLQuery);
String MemberID = null;
while (rs.next()){
MemberID = rs.getString("MemberID");
}
if (MemberID != null) {
out.print('Welcome');
}
else {
out.print('Wrong password');
}
when i trace in this line of code never process:
while (rs.next()){
MemberID = rs.getString("MemberID");
}
ps : i have 5 record in that table. when i erase where clause that tarouble
statement process.
JB6
Oracle 9i
Technical Details
Message-ID:
<3da3f303@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!diablo.theplanet.net!zen.net.uk!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,2515be328748cddb,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-10-09 02:50:06 PST From: "andy" <andy@cpssoft.com> Newsgroups: borland.public.jbuilder.java.api Subject: why my Resultset does not return result ? Date: Wed, 9 Oct 2002 16:12:48 +0700 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 202.169.37.155 Message-ID: <3da3f303@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1034154755 202.169.37.155 (9 Oct 2002 02:12:35 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!diablo.theplanet.net!zen.net.uk!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail