title: After select the table from one server and how to insert into another server?
body: <p>I have two servers and I need to transfer all the details of a particular user from one server to another server.</p>
  
  <p>I selected row from one server and now I have to insert into another server of a table.</p>
  
  <p>I selected the row and I return it in datatable.</p>
  
  <pre><code>select * 
  from [mp_Sites] 
  where SiteID = "+siteid+"
  </code></pre>
  
  <p>I called the stored procedure which is present in the server2 for insert into the table which is selected from server1.</p>
  
  <pre><code>cmd.CommandType = CommandType.StoredProcedure;
  
  cmd.Parameters.Add("@1", SqlDbType.Int).Value = moduleId;
  cmd.Parameters.Add("@2", SqlDbType.VarChar).Value = dtEventsXmls.Rows[i]["SettingName"].ToString();
  cmd.Parameters.Add("@3", SqlDbType.VarChar).Value = dtEventsXmls.Rows[i]["SettingValue"].ToString();
  cmd.Parameters.Add("@4", SqlDbType.VarChar).Value = dtEventsXmls.Rows[i]["ControlType"].ToString();
  cmd.Parameters.Add("@5", SqlDbType.NText).Value = dtEventsXmls.Rows[i] ["RegexValidationExpression"].ToString();
  </code></pre>
  
  <p>I think its complicated. Is there a better way of doing it?</p>