Java连接sqlserver2008数据库代码
java连接sqlserver2008数据库代码如下所示: public class SqlServer { public static void main(String[] args) { try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); Connection conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;database=mydb; ", "user", "pass"); Statement st = conn.
用户评论