• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Alejandro Barrero
Ranch Hand
Posts: 361
  • 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: 21984
36
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: 361
  • 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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!