aspose file tools*
The moose likes JDBC and the fly likes SQL/Access97 Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL/Access97 Question" Watch "SQL/Access97 Question" New topic
Author

SQL/Access97 Question

Craig Snowbarger
Ranch Hand

Joined: Mar 07, 2001
Posts: 38
I'm having a problem with the code excerpt below. I'm using the text entered in a textfield named tUsername as variable "u" in my query statement to validate password and username. Everything works fine when the username and password actually exist in the database. The problem I have is when the username or password does not exist in the database, the while "(rs.next())" statement is completely skipped. I assume this is happening b/c, when the query returns "" there is nothing for "(rs.next())" to go to next. Does anybody have any suggestions?
Thanks in advance,
Craig Snowbarger

fixed the final UBB tag from [ CODE ] to [ /CODE ]
[This message has been edited by Frank Carver (edited March 21, 2001).]
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974

Do you really need this in a while loop?
------------------
Moderator of the JDBC Forum


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL/Access97 Question
 
Similar Threads
Operand trouble!
Strange behaviour of ResultSet next method
missing return statement {
problem with while loop when ResultSet.next() is called
"ResultSet.next() was not called" Exception