Programming/jsp2014. 4. 1. 22:15
걍 외우는게 속편할(?) 녀석 ㅠㅠ

<%@ page import = "java.sql.DriverManager" %>
<%@ page import = "java.sql.SQLException" %>
<%@ page import = "java.sql.Connection" %> // interface
<%@ page import = "java.sql.Statement" %> // interface
<%@ page import = "java.sql.ResultSet" %> // interface

Class.forName("oracle.jdbc.driver.OracleDriver");

Connection conn = null;
Statement stmt = null;
ResultSet rs = null;

conn = DriverManager.getConnection(jdbcDriver, dbUser, dbPass);
stmt = conn.createStatement();
rs = stmt.executeQuery(query);

rs.next();
rs.getString("FIELD_NAME"); 


'Programming > jsp' 카테고리의 다른 글

oracle sql / sequence  (0) 2014.04.04
jsp / tomcat connection pool  (0) 2014.04.02
jdbc URL 구조  (0) 2014.04.01
jsp action tag / <jsp:useBean  (0) 2014.03.31
jsp cookie  (0) 2014.03.31
Posted by 구차니