日期:2014-05-16 浏览次数:20518 次
String connectionUrl = "jdbc:postgresql://192.168.100.207:5432/MySQL"; Class.forName("org.postgresql.Driver"); Connection conn = DriverManager.getConnection(connectionUrl,"test","test");
String connectionUrl = "jdbc:sqlserver://192.168.1.1;" + "databaseName=MySQL;user=test;password=test123"; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); Connection conn = DriverManager.getConnection(connectionUrl);