This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes SQL/Access97 Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL/Access97 Question" Watch "SQL/Access97 Question" New topic

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 "(" statement is completely skipped. I assume this is happening b/c, when the query returns "" there is nothing for "(" 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:
subject: SQL/Access97 Question
It's not a secret anymore!