title: INSERT INTO Access table from CSV file via C# code
body: <p>i have this table:</p>
  
  <pre><code>Items
  ====
  Barcode (text)
  Des (text)
  Price (double)
  </code></pre>
  
  <p>i made csv file  on <code>d:\Items.csv</code>  for fast insert  <code>(12345,computer,120.44).....</code>  </p>
  
  <p>i try to insert like this (C# WinForm program):</p>
  
  <pre><code>Cmd = Conn.CreateCommand();
  SQL = @"INSERT INTO Items SELECT * FROM [Text;DATABASE=" + @"d:" + @"\].[Items.txt];";
  Cmd.CommandText = SQL;
  Cmd.ExecuteNonQuery();
  </code></pre>
  
  <p>but i got 2 error:</p>
  
  <pre><code>1. Data type mismatch in criteria expression.
  
  2. The field 'Items.Barcode ' cannot contain a Null value because the Required property for this field is set to True.  Enter a value in this field.
  </code></pre>
  
  <p>how to fix this ?</p>