• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to connect Access by jdbc driectly?

 
Greenhorn
Posts: 10
Eclipse IDE Windows XP Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to connect to Access by jdbc driectly. But I failed many times. I don't know why.


 
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does "I failed" mean? Did something blow up?
 
Litas Lee
Greenhorn
Posts: 10
Eclipse IDE Windows XP Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ...
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Eclipse IDE Windows XP Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Not so fast naughty spawn! I want you to know about
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic