title: Getting SQL error SQL State S1009
body: <p>I'm trying to insert values into a table (inquiry) the first value is of type Date , and I'm getting an SQL error SQL State S1009. what is the proper way to convert the date , what am I doing wrong?</p>
  
  <pre><code>String sqlStatement = "INSERT INTO inquiry (INQUIRY_DATE,INQUIRY_NOTE,INQUIRER_ID,PROGRAM_ID,CLASS_ID,CORPORATE_ID)\n"
                  + "VALUES (?,?,?,?);";
  
          ps = con.prepareStatement(sqlStatement);
          java.sql.Date sDate = new java.sql.Date(inquiry.getInquiryDate().getTime());
  
          int parameterIndex = 1;
          ps.setDate(parameterIndex, sDate);
          ps.setString(parameterIndex++, inquiry.getInquiryNote());
          ps.setInt(parameterIndex++, inquiry.getInquirer().getInquirerID());
          ps.setInt(parameterIndex++, inquiry.getProgramID());
          ps.setInt(parameterIndex++, inquiry.getClassProgramID());
          ps.setInt(parameterIndex++, 1);
  </code></pre>