Skip to main content

Error while establishing JDBC Connection with SQLServer2000

1 reply [Last post]
portal_forums
Offline
Joined: 2008-09-15
Points: 0

Hi Im facing a problem while establishing a JDBC Connection with SQLServer 2000..
It is loading the driver but not able to establish a connection.
The Exception is "No suitable diver"

I added all the necessary jar files..(msbae.jar,mssqlserver.jar,msutil.jar,sqljdbc.jar)
I guess some some error in my url,Im not able to make what the error is bcoz i find whtever i gave in the url is correct.

this is my code...

public class Test {

public static void main (String args[]) throws Exception {
// Get connection

System.out.println("Testing........");
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
System.out.println("loading driver...");
Connection connection = DriverManager.getConnection(
"microsoft.jdbc.sqlserver://localhost:1433", "abc", "xyz");
System.out.println("connection established...");
}
}

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gluk
Offline
Joined: 2009-04-20
Points: 0

The solution for most of the Java related errors can be found at this site: http://iderror.com/category/errors/java/