sql = @"
UPDATE sc_post16.t_trains
SET scale_id = " + e
+",f_time = " + date.ToString("yyyy-MM-dd HH:mm:ss")
+",w_number =" + name[1]
+",brutto = " + name[2]
+ ",tara = " + name[3]
+ ",loadnorm = " + name[4]
+ ",netto = " + name[5]
+ ",overload = " + name[6]
+ ",cargo = " + name[7]
+ ",table_netto = " + name[8]
+ ",from_station = " + name[9]
+ ",to_station = " + name[10]
+ ",speed = " + name[11]
+ ",num_invoice = " + name[12]
+ ",operator_name = " + name[13]
+ ",smena = " + smen
+",WHERE w_number = " + name[1]
+ ",AND f_time = " + date.ToString("yyyy - MM - dd HH: mm: ss")
var commandText = "UPDATE Sales.Store SET Demographics = @demographics WHERE CustomerID = @ID;";
using (SqlConnection connection = new SqlConnection(connectionString))
{
SqlCommand command = new SqlCommand(commandText, connection);
command.Parameters.AddWithValue("@ID", customerID);
command.Parameters.AddWithValue("@demographics", demoXml);
connection.Open();
command.ExecuteNonQuery();
}
sql = String.Format("UPDATE ssc_post16.t_trains SET col1={0},..... colN = {N}",value1,value2 и т.д.)