This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes ODBC authentication problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ODBC authentication problem" Watch "ODBC authentication problem" New topic
Author

ODBC authentication problem

K McG
Greenhorn

Joined: Feb 02, 2002
Posts: 4
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

Joined: Jan 04, 2002
Posts: 24
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


No Path of Flowers lead to glory
K McG
Greenhorn

Joined: Feb 02, 2002
Posts: 4
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ODBC authentication problem
 
Similar Threads
Tomcat 6.0.32 HTTP Status 403 - Access to the requested resource has been denied
Request Opinions on MySQL User Authentication
Tracking Authentication
Mutual Authentication Possible?
Auth by DIGEST