try { |
Class.forName("weblogic.jdbc.oci.Driver"); /* load the driver classes and get the connection to the database */ |
Connection con = DriverManager.getConnection(url,username,password); |
//create and execute the query statement |
Statement stmt = con.createStatement(); |
ResultSet rs = stmt.executeQuery(query); |
dispResultSet(rs,out); |
//close connections here |
} Catch(SQLException ex) { |
//print the exceptions caught |
} |
} |