data adapter does not update
SqlConnection con=new SqlConnection("Data Source=real\\real;Initial Catalog=Northwind;Integrated Security=SSPI;");
string sql1="Select * from Employees";
SqlDataAdapter da=new SqlDataAdapter(sql1,con);
SqlCommandBuilder cb=new SqlCommandBuilder(da);
DataSet ds=new DataSet();
da.Fill(ds,"Employees");
ds.Tables[0].Rows[0]["LastName"]="Smith";
ds.AcceptChanges();
da.Update(ds,"Employees");
I execute the above simple code and yet the tables Employess from Nortwind database is not updated. I get no errors. I have followed the example from the documentation of SqlCommandBuilder.
aeroswanPosted Oct 27, 2004, 10:36 PM
eksypnos123Posted Oct 27, 2004, 4:25 PM
aeroswanPosted Oct 26, 2004, 11:35 PM