title: encounter ERROR: Data truncation: Out of range value for column 'StudentID' at row 1
body: <p>need your help on this error, I need to insert the value of an array into a row in MySQL except the primary key which is set to auto increment. however  I encounter this error, below is my db structure and my code to insert:    </p>
  
  <pre><code>     CREATE TABLE `predicted`  
  (`StudentID` int(10) NOT NULL AUTO_INCREMENT,`Calc1` varchar(50) NOT NULL,
        `ProgConcept` varchar(50) NOT NULL,
        `English1` varchar(50) NOT NULL,
        `Physics1` varchar(50) NOT NULL,
        `IntrotoIT` varchar(50) NOT NULL,
        PRIMARY KEY (`StudentID`)
      ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2147483648 ;
  </code></pre>
  
  <p>and the code to insert was:</p>
  
  <pre><code>/**
   *
   * @author fobia
   */
  import java.sql.*;
  import java.text.*;
  
  public class arraytodb {
      public static void sendtodb(String[]toarray, int lengthofarray){
  
          String db="";
          System.out.println("Length of array: "+lengthofarray);
          for(int i=0;i&lt;toarray.length;i++){
              if(i==0){
              db="'"+toarray[i]+"'";
  
              }else{
              db=db+"'"+toarray[i]+"'";
  
              }
  
              System.out.println("&gt;&gt;"+toarray[i]+"\t");
          }
          int counter=1;
          for(int a=1;a&lt;Integer.MAX_VALUE;a++){
              counter++;
          }
  //==============================================================================
  
          try{
              Connection con = null;
    String url = "jdbc:mysql://localhost:3306/thesis";
  //  String db = "";
    String driver = "com.mysql.jdbc.Driver";
    Class.forName(driver);
    con =       (Connection) DriverManager.getConnection(url,"root","");
    try{
                  java.sql.Statement st = con.createStatement();
                  //int val = st.executeUpdate("INSERT dataset VALUES('019','"+db+")");
                  int val = st.executeUpdate("INSERT INTO predicted (Calc1, ProgConcept, English1, Physics1, IntrotoIT) VALUES ('"+toarray[0]+"','"+toarray[1]+"' ,'"+toarray[2]+"', '"+toarray[3]+"', '"+toarray[4]+"')");
                  System.out.println("1 row affected");
    }
    catch (SQLException s){
        s.printStackTrace();
    System.out.println("failed");
    }
    }
    catch (Exception e){
    e.printStackTrace();
    }
      }
  
  }
  </code></pre>
  
  <p>the input for StudentID is has to be auto increment from one, and in this way I could not get it and always encounter error </p>
  
  <blockquote>
    <p>com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range
    value for column 'StudentID' at row 1</p>
  </blockquote>
  
  <p>thank you very much.</p>