Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / June 2005

Tip: Looking for answers? Try searching our database.

Java and Access 2002

Thread view: 
M K - 24 May 2005 20:40 GMT
I am looking for help in connecting with Access from Java.

Do I need a driver for forName?  If so where do I get it, or what is its
name?

How do I connect if the db does not require a uid or pw?

Mark

I just want to eventually use SQL statements to access the data.
Bjorn Abelli - 24 May 2005 21:52 GMT
"M K" wrote...

>I am looking for help in connecting with Access from Java.
>
> Do I need a driver for forName?  If so where do I get it,
> or what is its name?

 sun.jdbc.odbc.JdbcOdbcDriver is included in the jdk.

> How do I connect if the db does not require a uid or pw?

In short:

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

myConnection = DriverManager.getConnection
("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=mydb.mdb");

myStatement  = myConnection.createStatement();

// Bjorn A
M K - 25 May 2005 01:45 GMT
Thanks.. just what I was looking for.  Is there a place I can find all of
those for any db (ie. Oracle, SQL Server etc)

Good thing to have for future

> "M K" wrote...
>
[quoted text clipped - 17 lines]
>
> // Bjorn A
DartmanX - 25 May 2005 02:20 GMT
Each vendor tends to provide their own JDBC driver (for download via
their website). Best to go to the vendor website or Google it.
ken_north@compuserve.com - 02 Jun 2005 06:22 GMT
> Each vendor tends to provide their own JDBC driver (for download via
their website). Best to go to the vendor website ...

There are also drivers from middleware companies and open source
projects.
This list has dozens of drivers:

http://www.sqlsummit.com/JDBCVend.htm
John Currier - 03 Jun 2005 19:42 GMT
Is there an open-source driver that provides metadata for Access?  The
JDBC->ODBC bridge doesn't.

Thanks,
John


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.