soonhuat81

soonhuat81

  • NA
  • 31
  • 0

Editing data in a grid and updating error

May 25 2004 5:54 AM
Here is the components im using to update the data into database: dataset - fbDataAdapter - fbCommand - fbConnection Inside the dataset i've create the following table : Service1, Customer, Contract etc (in this case I'll only use the Service1 Table) .. The problem is when I'm editing the data inside the grid(the grid is link to DataSet Service table) and press "Update" button, the error occurs. The Update function is wrote as following : gridDisplayServiceMaintenance.MainView.UpdateCurrentRow(); if (fbConnection1.State.ToString() == "Closed") fbConnection1.Open(); FirebirdSql.Data.Firebird.FbCommandBuilder FbComBuilder = new FirebirdSql.Data.Firebird.FbCommandBuilder(fbDataAdapter1); fbDataAdapter1.Update(ServiceTable1); fbConnection1.Close(); MessageBox.Show("Saved!"); disableItems(); And here r the error message that's prompt out:= An unhandled exception of type 'System.Data.DBConcurrencyException' occured in system.data.dll Addidtional information : COncurrency Violation: the UpdatCommand affected 0 records Hopefully someone can help thx .

Answers (1)