Connecting to Oracle Using Thin Driver :
driverclassname = "oracle.jdbc.driver.OracleDriver";
dbprefix += "oracle:thin:";
System.out.println("Loading jdbc driver: " + driverclassname);
Class.forName(driverclassname);
DBURL = "jdbc:oracle:oci8:@
or @
DBURL = dbprefix + DBURL;
After that get the useid and password from user :
con = DriverManager.getConnection(DBURL, userid, password);
---------------------------------Connection Successful-------------------------------
No comments:
Post a Comment