Question on updating/inserting a datatable in a dataset
<p>I need to open a connection to SQL database and read a subset of a table and either update a record if exists or insert if not found.  Having truoble updating</p>

<pre><code>    SqlConnection conn = new SqlConnection(ConnectionStrings.PgenIntranet.SqlClientConnectionString);
                        SqlDataAdapter indicators = new SqlDataAdapter();
                        string sql = "SELECT * FROM BusinessApplications.tbl_WPI_Site_Indicators where Year = '" + year +
            "' and  Month = '" + month + "' and PlantId = " + site.ID;

  indicators.SelectCommand = new SqlCommand(sql, conn);
  SqlCommandBuilder cb = new SqlCommandBuilder(indicators);
  indicators.UpdateCommand = cb.GetUpdateCommand();
  DataSet ds = new DataSet();
  indicators.Fill(ds, "indtable");
  DataTable indtable = ds.Tables["indtable"];
    // this logic not working
       if (indtable.Rows.Count == 0) { indtable.NewRow(); }
        DataRow dr = indtable.NewRow();

    /// not sure how to make this work
      indtable[1]["PlantId"] = site.ID;
      dr["PlantId"] = site.ID;
</code></pre>
