heng03
asked on
Connect to Oracle DB
Hi
I want to connect to a Oracle Db.
Below is an example for connect to a MS Access.
Pls give sample code for connect to Oracle DB.
try{
Class.forName("sun.jdbc.od bc.JdbcOdb cDriver");
}
catch(ClassNotFoundExcepti on e)
{
System.out.println(e);
return; // to exit program on exception
}
}
try
{
//Can be improved by using connection pooling
Connection con=DriverManager.getConne ction("jdb c:odbc:Hig hway");
Statement stmt = con.createStatement();
} catch(SQLException e)
{
System.out.println("Encoun tered problem adding question. "+e);
}
Thanks & Rgds
Heng03
I want to connect to a Oracle Db.
Below is an example for connect to a MS Access.
Pls give sample code for connect to Oracle DB.
try{
Class.forName("sun.jdbc.od
}
catch(ClassNotFoundExcepti
{
System.out.println(e);
return; // to exit program on exception
}
}
try
{
//Can be improved by using connection pooling
Connection con=DriverManager.getConne
Statement stmt = con.createStatement();
} catch(SQLException e)
{
System.out.println("Encoun
}
Thanks & Rgds
Heng03
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Look here for drivers: http://servlet.java.sun.com/products/jdbc/drivers
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.