Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

DBConnect 본문

JSP/DB (2)

DBConnect

GAWON 2023. 5. 24. 18:53
package org.joonzis.db;

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


public class DBConnect {
   public static Connection getConnection() throws ClassNotFoundException, SQLException{
      Class.forName("oracle.jdbc.driver.OracleDriver");    
      
      String user = "scott";
      String password = "tiger";
      String url = "jdbc:oracle:thin:@localhost:1521:xe";   
      
      Connection conn = DriverManager.getConnection(url, user, password);
      
      return conn;
   }
}

'JSP > DB (2)' 카테고리의 다른 글

chapter05 : update  (0) 2023.05.24
chapter04 : update_one  (0) 2023.05.24
chapter03 : remove_one  (0) 2023.05.24
chapter02 : insert_one  (0) 2023.05.24
chapter01 : index  (0) 2023.05.24