-
Can not issue data manipulation statements with executeQuery(). , Type mismatch: cannot convert from int to ResultSet프로그램/JSP 2008. 12. 17. 16:48java.sql.SQLException: Can not issue data manipulation statements with executeQuery().
오류.
String query ="insert into bbs (id,pwd) values ("+id+","+pwd + ")";
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
Select 를 제외한 쿼리를 실행할 경우
stmt.executeUpdate(query); 를 써야만 한다.
An error occurred at line: 21 in the jsp file: /insert.jsp
Type mismatch: cannot convert from int to ResultSet
18:
19: stmt = conn.createStatement();
20:
21: rs = stmt.executeUpdate(query);
22:
23:
24:
이 경우 실행 한 후 select 가 아닌 경우 return 값이 없기 때문에 rs가 없다.'프로그램 > JSP' 카테고리의 다른 글
Invalid directive 에러 (0) 2008.12.17 jsp 페이징 (0) 2008.04.25 Failed shutdown of Apache Portable Runtime (0) 2008.04.07 Head First Servlet & JSP page 64 자바파일 컴파일 (0) 2008.03.30 Javasarang.net 에 대한 나의 가이드 (0) 2008.03.19 JEUS 설치 및 구동 (0) 2008.03.07 제우스 구동시 메뉴얼과 다른 부분이 있어서 우선 적어놓고 내일 확인해야겠다. (0) 2008.03.05