数据库连接出错?

数据库连接为什么会出错呢?

NO suitable driver found for jdbc .

问题源有3:

1.连接的url的格式有错:Connection conn=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=db_luntan","wing","wing")

2.驱动字符串出错;

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

3.项目中没有导入相应的jdbc驱动包。

你可能感兴趣的:(数据库连接,出错)