i am trying to insert some data using preparedStatement
stringbuffer.append("Insert into testuser(username,email,testname,testdate,");
stringbuffer.append("validityperiod,testid,percentage,message)");
stringbuffer.append("values(?,?,?,'"+s4+"','"+s4+"',?,?,?)");
PreparedStatement preparedstatement = connection.prepareStatement(stringbuffer.toString());
preparedstatement.setString(1, s1);
preparedstatement.setString(2, s2);
preparedstatement.setString(3, s3);
//preparedstatement.setString(4, s4);
//preparedstatement.setString(5, s4);
//preparedstatement.setString(6, s6);
preparedstatement.setInt(6, Integer.parseInt(s6));
//preparedstatement.setString(7, s7);
preparedstatement.setInt(7, Integer.parseInt(s7));
preparedstatement.setString(8, s8);
System.out.println("After insertion");
statement.executeUpdate(stringbuffer.toString());
here s4 is sate like( 05-january-2005)
this is the error appeared at consloe window of
tomcat java.sql.SQLException: ORA-01008: not all variables bound
what might be the problem
please help me...
cinux