String Querystring = "select lpad(' ',4*(level-1)) || msgrefnum from bbs connect by prior msgrefnum =
ref_level start with msgrefnum = 4";
ResultSet result = stmt.executeQuery(Querystring);
while(result.next())
{
out.println("-----------------------------------<br>");
out.println(" "+ result.getInt("msgrefnum") +"<br>");
}
-- 위에서 "msgrefnum"의 값을 출력하라고 실행하면 다음과 같은 에러가 발생합니다.
-----------------------------------------------------------------------------
java.sql.SQLException: Invalid column name: get_column_index
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.driver.OracleStatement.get_column_index(Compiled Code)
at oracle.jdbc.driver.OracleResultSet.findColumn(OracleResultSet.java)
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java)
at e_0003a.ibm.magic.web.oracledb_jsp_30._jspService(oracledb_jsp_30.java:106)
at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
at com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:111)
at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:400)
at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
-----------------------------------------------------------------------------
출력할 수 있는 방법을 알려 주세요..^^
|