JSPのクエリでデータベースにデータを挿入したい。これが私のコードです
<%@ include file="connect.jsp" %>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" + application.getRealPath("WEB-INF/travDB.accdb"));
Statement st = con.createStatement(1004,1008);
String user = request.getParameter("username");
String pass = request.getParameter("pass");
String konf = request.getParameter("konf");
String phone = request.getParameter("phone");
String tribe = request.getParameter("tribe");
String start = request.getParameter("start");
String agree = request.getParameter("agree");
String temp = "";
query = "insert into msuser (username, password, email, tribe, starting position, population) values ('"+user+"','"+pass+"','"+phone+"','"+tribe+"','"+temp+"',0)";
st.executeUpdate(query);
response.sendRedirect("Register.jsp?err=0");
}
%>
と言った理由
org.apache.jasper.JasperException: An exception occurred processing JSP page /JSP_H2Soal2_T213/doRegis.jsp at line 82
82: st.executeUpdate(query);
誰でも私を助けることができますか?