java.sql.SQLException: Column not found

Thread Solved

Join Date: Oct 2009
Posts: 3
Reputation: ankiwalia is an unknown quantity at this point 
Solved Threads: 0
ankiwalia ankiwalia is offline Offline
Newbie Poster

java.sql.SQLException: Column not found

 
0
  #1
Oct 10th, 2009
Hi all,

i am new to java servlets. i simply created a login form with username and password fields. now when i deployed it on tomcat server, after i click on submit button it gives the following error:

java.sql.SQLException: Column not found

codin of this login servlet is attached below. i have used username,password,name and address fields in my table(database). i have created it using ms-access.
please reply asap!!!
Attached Files
File Type: java Login.java (1.3 KB, 2 views)
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 793
Reputation: darkagn has a spectacular aura about darkagn has a spectacular aura about darkagn has a spectacular aura about 
Solved Threads: 110
darkagn's Avatar
darkagn darkagn is offline Offline
Master Poster
 
2
  #2
Oct 10th, 2009
Hi ankiwalia and welcome to Daniweb

Your SQL syntax is incorrect. Instead of this:
  1. String query="select username and password from Registeredusers";
Try this:
  1. String query="select username, password from Registeredusers";
Last edited by darkagn; Oct 10th, 2009 at 9:46 pm. Reason: Welcome new member
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 3
Reputation: ankiwalia is an unknown quantity at this point 
Solved Threads: 0
ankiwalia ankiwalia is offline Offline
Newbie Poster
 
0
  #3
Oct 11th, 2009
thank you darkagn..that was really a help...i changed the syntax..and it worked fine!!!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC