Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 스크롤 이벤트 감지
- formgroup
- Ionic modal
- TAILWIND
- ajax 사용 예시
- 앵귤러 모달
- egov spring ajax 사용 예시
- 앵귤러 애니메이션
- 검색
- route
- angular animation
- Router
- Angular Router
- angular button
- 옵저버블
- prisma
- ApexChart
- summary
- angular modal
- 호버
- 모달
- 셀렉트박스 커스텀
- modal
- scroll
- angular route
- Oracle LISTAGG 사용 예시
- 스크롤 이벤트
- 아이오닉 스크롤 이벤트
- mysql if
- flex-1
Archives
- Today
- Total
깜놀하는 해므찌로
CUBRID JDBC Driver 큐브리드 JDBC 드라이버 예시 / JDBC Batch 일괄 등록 입력 본문
반응형
SMALL
public String jdbcCubrid() {
logger.debug("====================== measurementResult Start =======================");
// DB접속 url
String url = "jdbc:cubrid:127.0.0.1:30000:DB_NAME:::";
// DB접속 ID
String id = "id";
// DB접속 패스워드
String pw = "1234";
Connection conn = null;
Statement stmt = null;
String result = "";
try {
Class.forName("cubrid.jdbc.driver.CUBRIDDriver");
// 접속정보로 JDBC 연결 커넥션 생성
logger.debug("====================== Before getConnection =======================");
conn = DriverManager.getConnection(url, id, pw);
logger.debug("====================== AFTER getConnection =======================");
// 실행쿼리
String sql = "SELECT * FROM TEST"
logger.debug("====================== Before createStatement =======================");
// Statement 생성 후 실행할 쿼리 정보 등록
stmt = conn.createStatement();
logger.debug("====================== After createStatement =======================");
// 결과를 담을 ResultSet 생성 후 결과 담기
ResultSet rs = stmt.executeQuery(sql);
logger.debug("====================== SQL =======================");
while(rs.next()){
result = (rs.getString("test"));
}
}catch(Exception e){
logger.debug("====================== CATCH =======================");
e.printStackTrace();
}finally{
logger.debug("====================== FINALLY =======================");
if (stmt != null) try {stmt.close();stmt = null;} catch(SQLException ex){}
if (conn != null) try {conn.close();conn = null;} catch(SQLException ex){}
}
return result;
}
반응형
LIST
'IT' 카테고리의 다른 글
Java ArrayList.clear() 자바 리스트 초기화 / 자바 arraylist 리셋 (0) | 2022.12.09 |
---|---|
Connection pool exhausted - try increasing 'maxPoolSize' and/or 'borrowConnectionTimeout' 에러 해결 방법 (0) | 2022.12.07 |
Java JDBC Batch 활용 예시 / JDBC 쿼리문 일괄 입력 / java 배치 활용 쿼리문 일괄 등록 JDBC (1) | 2022.12.03 |
Radiobox 라디오 박스 체크 해제 / 라디오 체크박스처럼 사용하기 예시 JavaScript (0) | 2022.12.01 |
Linux 리눅스 방화벽 목록 확인 조회 / 리눅스 방화벽 확인 명령어 (0) | 2022.11.28 |