title: asp.net multiple table update statement
body: <p>I need to turn this query into an update statement.  I will have to update the values from  fields.  Everything is already in place but the update statement.</p>
  
  <p>Here is the select version of the query:</p>
  
  <pre><code>SELECT i.GoLiveDate, i.FirstBonusRun, i.TechFName, i.TechLName, i.TechEmail, i.TechPhone, i.WebISPFName, i.WebISPLName, 
                i.WebISPEmail, i.WebISPPhone, i.FullFillFName, i.FullFillLName, i.FullFillEmail, i.FullFillPhone, d.FName,
                d.LName, d.HomePhone, d.Email
                FROM NC_Information i
                INNER JOIN Distributor d
                  ON d.DistID = i.ClientID
                WHERE clientID = @value
  </code></pre>
  
  <p>Is it possible to update two different tables from within the same query?</p>
  
  <p>Here is the code I have so far:</p>
  
  <pre><code>public void Update (int ClientID)
  {
      using ( var conn = new SqlConnection( GeneralFunctions.GetConnectionString() ) )
      using ( var cmd = conn.CreateCommand() )
      {
          conn.Open();
          cmd.CommandText =
          @"SELECT i.GoLiveDate, i.FirstBonusRun, i.TechFName, i.TechLName, i.TechEmail, i.TechPhone, i.WebISPFName, i.WebISPLName, 
            i.WebISPEmail, i.WebISPPhone, i.FullFillFName, i.FullFillLName, i.FullFillEmail, i.FullFillPhone, d.FName,
            d.LName, d.HomePhone, d.Email
            FROM NC_Information i
            INNER JOIN Distributor d
              ON d.DistID = i.ClientID
            WHERE clientID = @value";
          cmd.Parameters.AddWithValue( "@value", ClientID );
          cmd.ExecuteNonQuery();
      }
  }
  </code></pre>