This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Servlets and the fly likes Error while accessing MSAccess in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Error while accessing MSAccess in JSP" Watch "Error while accessing MSAccess in JSP" New topic
Author

Error while accessing MSAccess in JSP

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi,
I get the following error when I try to connect to MSAccess in JSP :
Root Error-1: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'DriverId'.
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'DriverId'.
The same piece of jave code is able to retrieve data when executed as a java application.
this is the piece of java code:
------------------- -----------
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
connection =
DriverManager.getConnection(
"jdbc dbc:Access","","") ;
statement= connection.createStatement();
statement.executeQuery("select * from <tablename>");
------------------------------
I would appreciate any help in this matter.
Thanks
info_seeker
Maky Chopra
Ranch Hand

Joined: Apr 11, 2001
Posts: 149
Your name 'info_seeker' does not comply with the JavaRanch naming policy. Please choose one that meets the requirements.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Error while accessing MSAccess in JSP