Update the SQL
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);
}
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Carlos SanchezRank #6,113 · 276 reputationPosted Jan 29, 2005, 7:05 AM EST
majid_ahrar6 reputationPosted Jan 29, 2005, 8:58 AM EST
majid_ahrar6 reputationPosted Feb 3, 2005, 9:42 AM EST
Carlos SanchezRank #6,113 · 276 reputationPosted Feb 9, 2005, 11:59 AM EST