SqlConnection thisConnection = new SqlConnection(@"Data Source=KING;Integrated Security=SSPI;Initial Catalog=master");
thisConnection.Open();
SqlDataAdapter thisAdapter = new SqlDataAdapter("SELECT WM,FIO from WebMoney", thisConnection);
SqlCommandBuilder thisBuilder = new SqlCommandBuilder(thisAdapter);
DataSet thisDataSet = new DataSet();
thisAdapter.Fill(thisDataSet, "master");
Console.WriteLine("NAME: {0}", thisDataSet.Tables["master"].Rows[0]["FIO"]);
thisDataSet.Tables["master"].Rows[0]["FIO"] = "The test string!";
thisAdapter.Update(thisDataSet, "master"); //ВОТ ТУТ ВЫВОДИТ ОШИБКУ
Console.WriteLine("NEW NAME: {0}", thisDataSet.Tables["master"].Rows[0]["FIO"]);
thisConnection.Close();
|