Jdbc sql server error: java.sql.SQLException: No suitable driver?

Your connection string is wrong. It should be just " jdbc:sqlserver://.... ". Read more here .

Up vote 0 down vote favorite 1 share g+ share fb share tw.

I'm using eclipse, trying to connect to a sql server db. I have the jars in my build path. I get the error: java.sql.

SQLException: No suitable driver at java.sql.DriverManager. GetConnection(DriverManager. Java:325) at java.sql.DriverManager.

GetConnection(DriverManager. Java:353) Here is my code: import java.sql. Connection; import java.sql.

DriverManager; import java.sql. ResultSet; import java.sql. Statement; public class connect { public void dbConnect(String db_connect_string, String db_userid, String db_password) { try { Class.

ForName("com.microsoft.sqlserver.jdbc. SQLServerDriver"); Connection conn = DriverManager. GetConnection(db_connect_string, db_userid, db_password); System.out.

Println("connected"); Statement statement = conn.createStatement(); String queryString = "select * from sysobjects where type='u'"; ResultSet rs = statement. ExecuteQuery(queryString); while (rs.next()) { System.out. Println(rs.

GetString(1)); } } catch (Exception e) { e.printStackTrace(); } } public static void main(String args) { connect connServer = new connect(); connServer. DbConnect("jdbc:jtds:sqlserver://ssdd.ffd.aduat.fdd.com:5150", "rre", "wer"); } } java sql-server eclipse jdbc link|improve this question asked Mar 7 '11 at 15:19ajoe13313 77% accept rate.

I think you r trying to use the JTDS URL with the MS SQL driver. What is the jar you have – DaUltimateTrooper Mar 7 '11 at 15:22.

Your connection string is wrong. It should be just "jdbc:sqlserver://....". Read more here.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions