public static void updateSqlOracle(String sqlstr,String linkIP,String username,String password) throws SQLException, ClassNotFoundException{

Class.forName("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@"+linkIP+":1521:GVDB";// 设置连接字符串  GVDB为实例名 linkIP为连接地址
Connection con=java.sql.DriverManager.getConnection(url,username,password);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sqlstr);

rs.close();
stmt.close();
con.close();

}

 

相关文章:

  • 2020-07-13
  • 2021-12-22
  • 2022-02-09
  • 2021-06-20
  • 2021-12-25
  • 2021-12-13
  • 2022-03-09
  • 2021-07-29
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-10-15
  • 2022-02-09
  • 2021-10-16
  • 2021-09-08
  • 2022-12-23
相关资源
相似解决方案