title: C# DataTable Update Multiple Lines
body: <p>how can i do multiple update using datatable ?</p>
  
  <p>i found this <a href="http://support.microsoft.com/kb/307587" rel="nofollow">Update 1 row</a></p>
  
  <p>my code:</p>
  
  <pre><code>public void ExportCSV(string SQLSyntax, string LeFile, bool Is_Ordre, int TypeDonne)
          {
              try
              {
                  using (var connectionWrapper = new Connexion())
                  {
                      var connectedConnection = connectionWrapper.GetConnected();
  
  
                      SqlDataAdapter da = new SqlDataAdapter(SQLSyntax, connectionWrapper.conn);
                      DataSet ds = new DataSet();
                      da.Fill(ds, "Emp");
                      DataTable dt = ds.Tables["Emp"];
                      CreateCSVFile(dt, LeFile, Is_Ordre, TypeDonne);
  
                      //Update all lines, it not save in Database
                      foreach (DataRow row in dt.Rows)
                      {
                          row["IS_IMPORT"] = true;
                      }
                  }
              }
              catch (Exception excThrown)
              {
                  throw new Exception(excThrown.Message);
              }
  
  
  
          }
  </code></pre>
  
  <p>the problem is :</p>
  
  <pre><code>foreach (DataRow row in dt.Rows)
                          {
                              row["IS_IMPORT"] = true;
                          }
  </code></pre>
  
  <p>it not save it into database.</p>
  
  <p>Thanks you in advance,
  Stev</p>