• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Driver for MSAccess

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam looking for a driver to access a database in Access I alredy have the code but This is not compiling:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

I am getting an error saying that Unhandled Exception type ClassNotFoundException

and when I use the import sun.jdbc.odbc.JdbcOdbcDriver;
says that the import sun.jdbc.odbc.JdbcOdbcDriver; is never used.

So I guess is that It cant find the driver! I am using eclipse and I tried to import the sun.jdbc.odbc.JdbcOdbcDriver but I cant find it. I know I have to import the jar files in the eclipse and tomcat and it is ok to do with SQL Server but no luck with MSaccess.

Also I know that it JDBC-ODBC driver comes with the jdk but where?? or which jar file I have to import??

Can you anyone point me where I can get or How??

Thanks
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by campos teixeira:
I am getting an error saying that Unhandled Exception type ClassNotFoundException


This is a basic Java compilation error. It doesn't mean that the class can't be found, it means that you aren't handling the exception properly.

A proper example would look something like:
 
campos teixeira
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks I did the catch for the exception and manage to connect to the database I think because I havent got a password for the database which is in MSAcess.

But Now I found out that MS Acess dont alow transactions because I tried to select a column from the java Apllication and nothing?



Anyone knows how??
Thanks
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, you are out of luck here. MS Access is a desktop database which means it doesn't have the robust features like transactioning. For learning purposes this is absolutely fine. However, MS Access should never be used to back a production application that is meant to scale beyond a handful or users.
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic