Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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: 74361
334
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic