aspose file tools*
The moose likes JDBC and the fly likes No Suitable Driver Found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No Suitable Driver Found" Watch "No Suitable Driver Found" New topic
Author

No Suitable Driver Found

Lawrence Gatson
Greenhorn

Joined: Oct 25, 2010
Posts: 9
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!!!
Rajkishore Pujari
Ranch Hand

Joined: Sep 03, 2005
Posts: 46
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
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40059
    
  28
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No Suitable Driver Found