bug in login authentication
hi all
i tried one of the code already posted in this forum for login authentication..am using JSP with MS Access
to authenticate the users the code that i executed is:
<html><body>
<%@ page language ="java" import = "java.io.*,java.lang.*,java.sql.*" %>
<% try
{
String strUsername = request.getParameter("user");
String strPassword = request.getParameter("password");
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection myConn = DriverManager.getConnection("jdbc:odbc:Driver={logg (login.mdb)};DBQ=C:/Program Files/Apache Tomcat 4.0/webapps/examples/jsp/sampless/login.mdb");
String strSQL = "SELECT username, password FROM log where username=? and password=?";
PreparedStatement statement = myConn.prepareStatement(strSQL);
statement.setString(1, strUsername);
statement.setString(2, strPassword);
ResultSet myResult = statement.executeQuery(strSQL);
if(myResult.next()){
out.println("Login Succesful! A record with the given user name and password exists");
}
else {
out.println("Login Failed. No records exists with the given user name and password");
}
myResult.close();
statement.close();
myConn.close();
}
catch(Exception e){out.println(e);
}
%>
</body>
</html>
i have given the driver connection through odbc
but i get an exception as follows
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
could you please help me with this bug..
thank you

