Reputation: 83
I have created a database : Admission.mdb, and added it to the user DNS : "adm" When I try to access it through java program, I use following code to connect the database
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:adm");
It worrks properly, and the program can access the database. But, when I tried to use the same code inside a servlet, it gives following Exception: "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" Can someone tell me what am I doing wrong?
Upvotes: 0
Views: 1319