• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why JDBC failed to connect Access?

Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,

The database of my company is Access, and I tried to use JDBC to connect as following code:
It compiled well and will throw java.sql.SQLException, saying cant find data source name and no default driver.
Later I tried another way, first create a system DSN of Microsoft Access driver in ODBC Manager in control panel and name it myDb, and then This time my jdbc can connect to Access. But this program should be run in client computer and should use the first approach. Can you tell me why the first way is wrong?Thank you.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!