..
jsp에서 procedure 호출
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
<%@ page contentType="text/html;charset=euc-kr" import="java.sql.*" %><%
String mseq = request.getParameter("mseq");
String tbbs = request.getParameter("tbbs");
if (mseq==null||tbbs==null) {
%>mseq와 tbbs값이 필요합니다.<%
return; // stop
}

String DB_URL = "jdbc:oracle:thin:@localhost:1521:okjspdb";
String DB_USER = "scott";
String DB_PASSWORD= "tiger";

Connection conn=null;
CallableStatement cstmt=null;

String query = "{call PROC_KBOARD_MOVE(?,?)}";
try {
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn = DriverManager.getConnection(DB_URL, DB_USER, DB_PASSWORD);

        cstmt = conn.prepareCall(query);
        cstmt.setString(1, mseq);
        cstmt.setString(2, tbbs);

        cstmt.executeUpdate();
%>실행되었습니다.<%
} catch(Exception e){
        out.println(e.getMessage());
} finally {
        cstmt.close();
        conn.close();
}
%>


  Comments,     Trackbacks