System.Data.DBConcurrencyException
-
I have a app with a grid and am working on updating data from the grid to the data base. the update is triggered off a menu item. the code is as follows: try { // New data entered to Contract QA_Setup table DataAccess da = new DataAccess(); string sproc = "prc_QA_Setup_upd"; string dbAction = "Update"; string tableName = "QA_Setup"; // Update to find grid changes //ug.Update(); ug.UpdateData(); // to retrieve ds with modified rows to grid ds.GetChanges(DataRowState.Modified); // Call to DAL to update QA_Setup with new data da.updateDB(ds, sproc, dbAction, tableName); } This passes to the DAL and tries to run: private void prepareUpdate(string sproc, string tableName) { // Create parameters for the QA_Setup dataset via Sqlcommand SqlCommand cmd = new SqlCommand(sproc, conn); // call set cmd properties defineParams(tableName, cmd); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = sproc; //RunProc(sproc); //RunProc(cmd); dap.UpdateCommand = cmd; } However I get a System.Data.DBConcurrencyException, what am I missing?