Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
Marshal
Posts: 53110
124
  • 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!