不用ODBC,怎样用 JDBC 连接 SQL Server 2000 啊???
如下代码为什么不行啊???
String URL = "jdbc:postgresql://localhost:5432/MyDB"; Class.forName("org.postgresql.Driver"); Connection con = DriverManager.getConnection(URL); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select * from MyTab"); while (rs.next()) { System.out.println(rs.getString(1)); } 请各位大虾帮帮帮忙啊!!!