aspose file tools*
The moose likes JDBC and the fly likes Not able to connect with SQLServer from java. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Not able to connect with SQLServer from java." Watch "Not able to connect with SQLServer from java." New topic
Author

Not able to connect with SQLServer from java.

Praveen Kumar
Ranch Hand

Joined: Nov 06, 2006
Posts: 133
Hi,

I am using below program to connect my MSSQLServer :



But i am getting error saying : java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver.

I stetted SQLJDBC4.jar and SQLJDBC.jar files in class path but still i am getting above error. Please tell me what exactly i am doing here ?.. and please tell me where can i get SQLServerDriver (link please )..

Need your suggestions soon :-)

Thanks
Praveen

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Here is a link to Microsoft's own JDBC driver. And here is a link to jTDS.

Asuming SQLJDBC4.jar or SQLJDBC.jar is in your classpath this should work fine.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Not able to connect with SQLServer from java.