title: How can I insert null data?
body: <p>I want to insert null data to Teradata with JDBC connection on JAVA.
  First of all I try this:</p>
  
  <pre><code>PreparedStatement stmt;  
  String qm="Insert into db.user values (?,?,?,?,?,?,?)";
  connection= DriverManager.getConnection
               (
                 "jdbc:teradata://192.xxx.x.xx/database=DBC,tmode=ANSI,charset=UTF8","user","passw0rd"             ); 
  stmt = connection.prepareStatement(qm); 
  //some code here to open while loop 
     stmt.setObject(i,null); // This isnt working with Terada JDBC. It is working for Oracle and MSSQL JDBC   
  //and I finish my code     
  </code></pre>
  
  <p>And after, that I tried this instead of <code>stmt.setObject(i,null);</code> :</p>
  
  <p><code>stmt.setNull(i,rsmd.getColumnType(i),rsmd.getColumnTypeName(i));</code> 
  <code>rsmd.getColumnType(i)</code>     is equal to 97
  <code>rsmd.getColumnTypeName(i)</code> is equal to DATE</p>
  
  <p>Yes it is true my field is DATE.</p>
  
  <p>But it gives this ERROR:
  <code>ERROR : [Teradata JDBC Driver] [TeraJDBC 14.10.00.17] [Error 857] [SQLState HY000] Two different data types are being set for parameter 17 (449 &amp; 749)</code></p>
  
  <p>How can I fix this.</p>