Hi all,
//These are values entered in a form
String title = request.getParameter("title");
String firstname = request.getParameter("firstname");
String lastname = request.getParameter("lastname");
//The primary key is set up as auto_increment in the db
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO staff VALUES(NULL,?,?,?)");
pstmt.executeUpdate();
I get this error when compiling:
"No value specified for parameter 1" ?
how do you set that the first question mark is title etc...
cheers
vero
//These are values entered in a form
String title = request.getParameter("title");
String firstname = request.getParameter("firstname");
String lastname = request.getParameter("lastname");
//The primary key is set up as auto_increment in the db
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO staff VALUES(NULL,?,?,?)");
pstmt.executeUpdate();
I get this error when compiling:
"No value specified for parameter 1" ?
how do you set that the first question mark is title etc...
cheers
vero