• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while accessing MSAccess in JSP

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your name 'info_seeker' does not comply with the JavaRanch naming policy. Please choose one that meets the requirements.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic