public static void main(String[] args) {标签:String,tas,数据库,System,highgo,操作,conn,out From: https://www.cnblogs.com/zuojian2013/p/18386082
try {
Connection conn;
String name = "com.highgo.jdbc.Driver";
String url = "jdbc:highgo://120.224.9.106:5866/tas_qlk?currentSchema=schemaname";
String user = "tas";
String password = "123456";
Class.forName(name);
conn = DriverManager.getConnection(url, user, password);
conn.setAutoCommit(false);
System.out.println("连接成功" + url);
Statement statement = conn.createStatement();
ResultSet resultSet = statement.executeQuery("select * from tas_kjj_kjcxxt.project");
while (resultSet.next()) {
String result = resultSet.getString(1);
System.out.println(result);
}
} catch (Exception e) {
System.out.println("error" + e.getMessage());
}
}