Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect Access by jdbc driectly?

 
Litas Lee
Greenhorn
Posts: 10
Debian Eclipse IDE Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to connect to Access by jdbc driectly. But I failed many times. I don't know why.


 
Tim Moores
Bartender
Posts: 3135
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "I failed" mean? Did something blow up?
 
Litas Lee
Greenhorn
Posts: 10
Debian Eclipse IDE Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:What does "I failed" mean? Did something blow up?


It always print like :

Driver Error java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
Connection Error java.sql.SQLException: [Microsoft][ODBC ...
 
Jay Mitchell
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been doing a little research on this and have used a DSN for an Excel file recently.

A couple of questions:

1) Does "I want to connect to Access directly" mean "I want to use a DSN-less connection"?
2) If you are not trying to use a DSN-less connection, you will need to set up a Windows bridge. See the following: JDBC-ODBC bridge ODBC-JDBC Bridge
3) If you are trying to use a DSN-less connection, there are known issues with 64 bit operating systems. See this thread: DSN-less connections

Hopefully one of them addresses your issue!
 
Litas Lee
Greenhorn
Posts: 10
Debian Eclipse IDE Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay Mitchell wrote:I've been doing a little research on this and have used a DSN for an Excel file recently.

A couple of questions:

1) Does "I want to connect to Access directly" mean "I want to use a DSN-less connection"?
2) If you are not trying to use a DSN-less connection, you will need to set up a Windows bridge. See the following: JDBC-ODBC bridge ODBC-JDBC Bridge
3) If you are trying to use a DSN-less connection, there are known issues with 64 bit operating systems. See this thread: DSN-less connections

Hopefully one of them addresses your issue!


Thanks for your reply.
I want DSN-less. Now I found my mistakes in my code. Some mistakes about Drivername such as:
There should be a space between "Driver" and "(*.mdb)" in line 9
and there also should delete the space in quotations of Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver ") in line 12
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic