title: error :Data-Truncation while inserting in table
body: <p>i am trying to insert the value in the table by passing the value in a function
  like this:</p>
  
  <pre><code>public void insert(long r,String s_n,char sex,String sf_n,String sm_n,int c,char sec,long tel,long amount,String add,int age,String house)
      {
          try{
              this.ps=this.con.prepareStatement("insert into s_table values(?,?,?,?,?,?,?,?,?,?,?,?);");
              this.ps.setLong(1,r);
              this.ps.setString(2,s_n);
              this.ps.setObject(3,sex,java.sql.Types.CHAR);
              this.ps.setString(4,sf_n);
              this.ps.setString(5,sm_n);
              this.ps.setInt(6,c);
              this.ps.setObject(7,sec,java.sql.Types.CHAR);
              this.ps.setLong(8,tel);
              this.ps.setLong(9,amount);
              this.ps.setString(10,add);
              this.ps.setInt(11, age);
              this.ps.setString(12,house);
              this.ps.executeUpdate();
              this.ps.close();
              con.close();
          }catch(SQLException e){System.out.println("The statement is not established while inserting the element bco'z of "+e.getMessage());
          e.printStackTrace();}
      }
  </code></pre>
  
  <p>the jsp page model is:</p>
  
  <p>but it is showing data truncation error.
  <img src="https://i853.photobucket.com/albums/ab96/purvesh_cool/untitled.jpg" alt="alt text">FYI:connection has been established</p>