File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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.
 
Don't get me started about those stupid light bulbs.
 
subject: ODBC authentication problem