954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

java.sql.SQLException: Column not found

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!!!

Attachments Login.java (1.34KB)
ankiwalia
Newbie Poster
5 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

Hi ankiwalia and welcome to Daniweb :)

Your SQL syntax is incorrect. Instead of this:

String query="select username and password from Registeredusers";

Try this:

String query="select username, password from Registeredusers";
darkagn
Veteran Poster
1,197 posts since Aug 2007
Reputation Points: 404
Solved Threads: 200
 

thank you darkagn..that was really a help...i changed the syntax..and it worked fine!!!

ankiwalia
Newbie Poster
5 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You