开发者

Error when using JDBC Driver- java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

开发者 https://www.devze.com 2023-04-08 10:47 出处:网络
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--

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号