HighlandJinx
Programmer
Creating a small app in Visual Studio using Visual c#.
I have an SQLExpress Database, and have a datagrid reading the data. But once the user edits a row and updates using the save button, the program DOES say that its been updated,and does show it on the grid, but once i exit the program, the data has not been written the the database. Here is the code for the save:
The User edits the grid with thats bound to the lkuEquipmentInfoBindingSource.
They hit Save and this is what happens, and a message box appears saying how many Rows have been updated. It always does return the correct number of rows, but it doesnt ACTUALLY save it to the database.
Any help would be great,
Thanks.
I have an SQLExpress Database, and have a datagrid reading the data. But once the user edits a row and updates using the save button, the program DOES say that its been updated,and does show it on the grid, but once i exit the program, the data has not been written the the database. Here is the code for the save:
Code:
private void lkuEquipmentInfoBindingNavigatorSaveItem_Click_1(object sender, EventArgs e)
{
this.Validate();
this.lkuEquipmentInfoBindingSource.EndEdit();
int results = 0;
results = this.lkuEquipmentInfoTableAdapter.Update(this.wFRPDataDataSet.lkuEquipmentInfo);
MessageBox.Show("Rows Updated = " + results.ToString());
}
The User edits the grid with thats bound to the lkuEquipmentInfoBindingSource.
They hit Save and this is what happens, and a message box appears saying how many Rows have been updated. It always does return the correct number of rows, but it doesnt ACTUALLY save it to the database.
Any help would be great,
Thanks.