当我尝试运行以下脚本时,我不断收到无效标识符异常:javax.servlet.ServletException: java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00904: "CUSTID": invalid identifier
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:rreOracle","xxxxxx","xxxxxxxx");
stmt = conn.createStatement();
PreparedStatement preparedStatement;
//get parameters from the request
String custID=request.getParameter("cust_ID");
String saleID=request.getParameter("sale_ID");
String firstName=request.getParameter("first_Name");
String mInitial=request.getParameter("mI");
String lastName=request.getParameter("last_Name");
String streetName=request.getParameter("street");
String city=request.getParameter("city");
String state=request.getParameter("state");
String zipCode=request.getParameter("zip_Code");
String DOB=request.getParameter("DOB");
String agentID=request.getParameter("agent_ID");
String homePhone=request.getParameter("home_Phone");
String cellPhone=request.getParameter("cell_Phone");
String profession=request.getParameter("profession");
String employer=request.getParameter("employer");
String referrer=request.getParameter("referrer");
preparedStatement = conn.prepareStatement("UPDATE customer"
+ " SET customer.cust_ID=?, customer.sale_ID=?, customer.first_Name=?, customer.mI=?, customer.last_Name=?, customer.street_Name=?, customer.city=?, customer.state=?, customer.zip_Code=?,customer. DOB=?, customer.agent_ID=?, customer.home_Phone=?, customer.cell_Phone=?, customer.profession=?, customer.employer=?, customer.referrer=?"
+ " WHERE customer.cust_ID=custID ") ;
preparedStatement.setInt(1, Integer.valueOf(custID));
preparedStatement.setInt(2, Integer.valueOf(saleID));
preparedStatement.setString(3, firstName);
preparedStatement.setString(4, mInitial);
preparedStatement.setString(5, lastName);
preparedStatement.setString(6, streetName);
preparedStatement.setString(7, city);
preparedStatement.setString(8, state);
preparedStatement.setString(9, zipCode);
preparedStatement.setString(10, DOB);
preparedStatement.setInt(11, Integer.valueOf(agentID));
preparedStatement.setString(12, homePhone);
preparedStatement.setString(13, cellPhone);
preparedStatement.setString(14, profession);
preparedStatement.setString(15, employer);
preparedStatement.setString(16, referrer);
preparedStatement.executeUpdate();