Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java and ms access 2007 error "Data source name not found and no default driver specified "

 
randall erasmus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Java Gurus

Im really struggling to sort out this problem can you help me out. I have been struggling for a few days now
with this problem.

I will paste my code here :

 
Campbell Ritchie
Sheriff
Posts: 48910
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I have added code tags, and broken some of the long lines; you can see how much better your code looks Beware on this forum: tick the disable smilies box otherwise :‍odbc turns into dbc.
But you haven’t told us what goes wrong; we can’t help if we don’t know. Do you suffer an Exception? If so, please show us the stack trace. Do you need a password?
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Morning Randall and welcome to the Ranch.

I think you have the driver name wrong. As far as I remember the Driver name is jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};; . Try this

 
Carles Gasques
Ranch Hand
Posts: 199
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Java Ranch has a reference in this topic JDBC ODBC FAQ .


I have accomplished this task always using an odbc datasource configured in windows (control panel / Administrative tools / Data Sources), say myds, and then


Best regards,
 
randall erasmus
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Java Gurus

thanks alot to Saif Asif Mirza your input helped me fixed the problem. Oh and sorry for only replying now.


regards, Randall Erasmus
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic