I am sorry I don't know if this is an off topic.
The employee table has exactly 11 columns, and this is my jsp code :
<%@page language="java" import="java.sql.*"%>
<%@ include file="Connections/connCompass.jsp" %>
<%
String photo = (String)request.getParameter("txtImageURL");
String employee_last= (String)request.getParameter("txtLastName");
String employee_first = (String)request.getParameter("txtFirstName");
String employee_id = (String)request.getParameter("txtId");
String phone = (String)request.getParameter("txtPhone");
String reward_date = (String)request.getParameter("txtDate");
String department = (String)request.getParameter("txtDept");
String employee_extension = (String)request.getParameter("txtExt");
String email = (String)request.getParameter("txtEmail");
String nominee_info = (String)request.getParameter("txtNotes");
String nominated_by = (String)request.getParameter("txtNominatedby");
%>
<%
System.out.println("test zero....");
Driver DriverResults =
(Driver)Class.forName(MM_connCompass_DRIVER).newInstance();
Connection ConnResults =
DriverManager.getConnection(MM_connCompass_STRING,MM_connCompass_USERNAME,MM_connCompass_PASSWORD);
PreparedStatement StatementResults;
String stmt = "insert into employee VALUES(employee_id, employee_first,
employee_last, nominated_by, photo, employee_extension, department,
nominee_info, phone, email, reward_date)";
StatementResults = ConnResults.prepareStatement(stmt);
if (!((photo == null) | (employee_last == null) | (employee_first == null) |
(employee_id == null) | (phone == null) |
(department == null) | (reward_date == null) | (employee_extension ==
null) | (email == null) | (nominee_info == null) | ( nominated_by == null)
))
{
StatementResults.executeQuery();
response.sendRedirect("insertok.jsp");
System.out.println("test one....");
}
%>
But when I run it, I got this error,( is this a Microsoft Access error?):
A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: [Microsoft][ODBC Microsoft Access Driver]
Too few parameters. Expected 11.
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:481)
Thank you so much for your help.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets