紧急问题:数据库连接问题:jdbc:microsoft:sqlserver://localhost:1433
public class Test{
public Test(){}
public static void main(String args[]){
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn
=DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;User=sa;Password=;DatabaseName=maxwell");
Statement stmt=conn.createStatement();
String sql="select * from employee";
ResultSet rs = stmt.executeQuery(sql);
while(rs.next()) {
System.out.println("TestName:"+rs.getString("name"));
}
rs.close();
stmt.close();
conn.close();
} catch(Exception ex) { System.err.println(ex.getMessage()); }
}
}
请教:这里的端口号1433是什么意思??我可以把它改成:8080吗???