I am trying to use the Microsoft SQL Server 2008 Type 4 JDBC Driver in a java desktop application.
However when I run the program I get the following error–
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
How do I overcome this error? The code looks to be OK as it is…Its a single sql statement to be executed into local sql server 2008 database.
Make sure that the
.jarcontaining this driver is in yourCLASSPATH. Here’s an article explaining how to setup this.