Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.*;
- import java.io.*;
- import oracle.jdbc.pool.OracleDataSource;
- class DevOracleSucks {
- public static void main (String args []) throws SQLException, IOException {
- // connect to the database
- OracleDataSource ods = new OracleDataSource();
- ods.setURL("jdbc:oracle:oci8:test_cvtech/cvtech@devoracle.toronto.terida.net");
- System.out.flush();
- Connection conn = ods.getConnection();
- System.out.println("Connected.");
- Statement stmt = conn.createStatement();
- // Select some value
- ResultSet rset = stmt.executeQuery("SELECT * FROM USER_ACCOUNT");
- while (rset.next()) {
- System.out.println(".");
- }
- rset.close();
- stmt.close();
- conn.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement