Error when using JDBC Driver- java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
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.micr开发者_高级运维osoft.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 .jar
containing this driver is in your CLASSPATH
. Here's an article explaining how to setup this.
精彩评论