Java JDBC Oracle Connection getOracleConn()

Here you can find the source of getOracleConn()

Description

get Oracle Conn

License

Open Source License

Declaration

public static Connection getOracleConn() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Connection;
import java.sql.DriverManager;

import java.util.Properties;

public class Main {
    static Properties pros = null;

    public static Connection getOracleConn() {
        try {/* ww w  .  ja  va  2 s  .com*/
            Class.forName(pros.getProperty("oracleDriver"));
            return DriverManager.getConnection(pros.getProperty("oracleURL"), pros.getProperty("oracleUser"),
                    pros.getProperty("oraclePwd"));
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}

Related

  1. getDatabaseConnection()
  2. getDBVersion(String dbSourceName, String server, int port, String dbName, String userid, String pwd)
  3. getJDBCConn(String hostname, String port, String sid, String username, String pwd)
  4. getJDBCConnection()
  5. getOracle10GConnection(String connIP, String port, String dbName, String username, String password)
  6. getOracleConnection()
  7. getOracleDBConnection(String server, String database, String username, String password)
  8. GetSchemaList(String dbSourceName, String server, int port, String dbName, String userid, String pwd)
  9. OpenConnection(String dbSourceName, String server, int port, String dbName, String userid, String pwd)