Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ODBC authentication problem

 
K McG
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My application currently uses JDBC-ODBC driver to connect to an MS Access database. With a correct username and password, authenticates fine. With invalid username and password, authentication fails. With any username and no password, authenticates fine. The last one is a big problem, have any suggestions on how to fix?
 
Sals Hamid
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using sessions u can handle this problem e.g.
u create html file for login. There is 2 text boxes in it one is for user name and other for password,there names are id and p.
In jsp file in scriplets tag
<% id = request.getParameter("id");
pass=request.getParameter("p");
if((id.equals("salman"))&&(pass.equals("salman12")))
{session.putvalue("usr",id);
In this way u can solve ur problem
 
K McG
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there away to do it without using any external application? The password will be set in ODBC Data Source Administrator, and will not be hard-coded or stored in a config file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic