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.
"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