Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class OracleCon {
- private Connection conn = null;
- public OracleCon(){
- try {
- Class.forName("oracle.jdbc.driver.OracleDriver");
- conn = DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/xe", "kp", "03031994");
- } catch (ClassNotFoundException classNotFoundEx) {
- } catch (SQLException sqlEx){
- }
- }
- public Connection getConnection() {
- return this.conn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement