Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java DataSource

import java.sql.*;
import javax.sql.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.pool.*;

public class DataSource {
    
        
    public static void main(String[] args) {
        try {
            OracleDataSource ods = new OracleDataSource();
            
            ods.setUser("stud");
            ods.setPassword("stud");
            ods.setDriverType("thin");
            ods.setDatabaseName("orbis");
            ods.setServerName("localhost");
            ods.setPortNumber(1521);
            
            Connection conn = ods.getConnection();
            System.out.println("Connection successful!!!");
            
        } catch (SQLException se) {
            se.printStackTrace();
        }
        System.out.println("Goodbye!");
    }
    
}
Comment

PREVIOUS NEXT
Code Example
Java :: getBatteryPercentage android studio 
Java :: settextappearance deprecated android 
Java :: convert python to java translator online 
Java :: write arraylist to outputstream java byte file 
Java :: aggregationoperation multi match 
Java :: ["org.elasticsearch.bootstrap.startupexception: java.lang.illegalstateexception: failed to obtain node locks, 
Java :: java lib reference 
Java :: java take inpt into arraylist 
Java :: Scanner library showing element not found exception 
Java :: split() String android 
Java :: implement hashmap 
Java :: why fields should be final in immutable class? 
Java :: java run multiple cmd commands 
Java :: run app by package android 
Java :: calculate values of array 
Java :: stack java 
Java :: how to move get selected from jfxtreetableview javafx 
Java :: equals() method in java algorithm 
Java :: can you automate mouseclicks with java 
Java :: subtract two variables in java 
Java :: action performed java swing code 
Java :: Java Integer Literals 
Java :: Java Insert Elements to LinkedHashSet 
Java :: java 11 read file line by line 
Java :: jframe open another frame using button actionlistener 
Java :: how to convert a jsonobject to a dbobject 
Java :: android code get arrayList index 
Java :: crazy error 
Java :: Java int Keyword 
Java :: problemi arrayList javafx 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =