can't update sql table with TableAdapter.Update
Hello all,
I'm unable to update a SQL table in C# 2005. I created a basic form with binding navigator, dataset, tableAdapter, and a BindingSource. I have 3 text boxes on the form to display data from my table. The text boxes are bound to the binding source. I can make changes and they stick until I exit the application. I have a message box tell me how many rows are updated and that seems to work but when I look at my data all of the changes are gone.
I put this code in a button to update the table from the dataset:
privatevoid btnOk_Click(object sender,EventArgs e) Here is my form load:
{
this.pIDXBindingSource.EndEdit();
int result = 0;
result =this.pIDXTableAdapter.Update(this.PtDataSet.PIDX);
MessageBox.Show(result.ToString() +" Table has been updated");
}
privatevoid MainForm_Load(object sender,EventArgs e)
{
this.pIDXTableAdapter.Fill(this.PtDataSet.PIDX);
}

