Java JDBC Oracle Connection getConnection()

Here you can find the source of getConnection()

Description

get Connection

License

Open Source License

Declaration

public static Connection getConnection() throws SQLException 

Method Source Code


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

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

public class Main {
    static final String url = "jdbc:oracle:thin:@localhost:1521:xe";
    static final String user = "CRESCER16";
    static final String pass = "CRESCER16";

    public static Connection getConnection() throws SQLException {
        return DriverManager.getConnection(url, user, pass);
    }//from w  w  w .j  a v  a  2 s.  com
}

Related

  1. createConnection()
  2. createDataBaseConnection(String hostName, String portNumber, String userName, String password)
  3. CreateTableScript(String dbSourceName, String db2SchemaName, String schemaList, String server, int port, String dbName, String userid, String pwd)
  4. getConnection()
  5. getConnection()
  6. getConnection()
  7. getConnection()
  8. getConnection()