Import java.sq. *; connection conn = null; statement stmt; resultset rs; string sql = "select * from tab";
// con = DriverManager.getConnection ("JDBC: POOLMAN: / / TGPMS-HELP"); / / Connect Oracle Database Class.Forname ("Oracle.jdbc.driver.Oracledriver). NewInstance (); conn = drivermanager.getConnection ("JDBC: Oracle: Thin: @ 192.168.15.248: 1521: YCDB", "WebcfcQuery", "Kill859"); // Connect the mysql database class.Forname ("org.gjt.mm.mysql.driver). NewInstance (); Conn = drivermanager.getConnection ("JDBC: MySQL: // LocalHost / Meeting", "Root", "21cent"); stmt = con.createstatement (); rs = stmt.executeQuery (SQL); rs.close (); Stmt.close (); con.close ();