It's not a secret anymore!
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "No Suitable Driver Found" Watch "No Suitable Driver Found" New topic

No Suitable Driver Found

Lawrence Gatson

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 (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
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46352
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:
subject: No Suitable Driver Found
It's not a secret anymore!