• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

No Suitable Driver Found

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a newbie to Java/JDBC, I'm having trouble connecting to MSSQL Server...hopefully someone can assist:

I downloaded the jtds JDBC driver from Sourceforge.net (type 4 driver)

Key parts of the code follow:



I've also configured the eclipse build path to include all the jars contained in the JDBC
driver zip file (I also tried to configure the build path with just the JDBC driver zip file).

I'm getting following SQLException:
java.sql.SQLException: No suitable driver found for jdbc:jtds:sqlserver://<ip_address>:<port>/<database_name>

I've exhausted my background and knowledge...can someone please help!!!
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems like you are doing it right. One small thing though, you do not have to call newInstance after Class.forName.
Here are couple of links that may be helpful for you

http://jtds.sourceforge.net/faq.html#noSuitableDriver
http://www.javacamp.org/moreclasses/jdbc/jdbc.html
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Please note the code button; since you are new I have edited your post and you can see how much better it looks
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic