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

java.sql.SQLException: [Microsoft][ODBC Driver Manager]

 
Alejandro Barrero
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the exception "java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" but my code is dsnless. I am using a database created in Java 32 bits and I am using a JVM of 32 bits.
My code is:

Strangely, this code works in another MyEclipse project.
 
Paul Clapham
Sheriff
Posts: 21567
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have any data to base this guess on, but my guess is that your file path is a relative path, and that you are making an incorrect assumption about the current working directory when you run the code.
 
Alejandro Barrero
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your prompt reply. I have verified that the file path is absolute and is correct. Strangely, the exception mentions a DSN but the code is DSNless. i imagine that the problem is something in the environment, but I cannot envision it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic