4
Reply

update the SQL

majid_ahrar

majid_ahrar

Jan 28 2005 1:06 PM
2.6k
Good morning all I have two tables in SQL server. These two are related. I try to update these tables through the C# form. I do not have any data in these tables. The following are the Load and Save button codes. what am I doing worng? the SQL table does not get updated. Thanks for your help Mike Load function this.sqlDataAdapter1.Fill(this.DataSet1); this.BindingContext[this.DataSet1, "Patfo"].EndCurrentEdit(); this.BindingContext[this.DataSet1, "Patfo"].AddNew(); Save button: try { this.sqlDataAdapter1.Update(this.DataSet1); } catch(System.Exception Ex) { MessageBox.Show(Ex.Message); }

Answers (4)