<WebMethod()> _ Public Function UpdateCustomer(ByVal dsnew As DataSet) As String Dim nResult As OakLeaf.MM.Main.Business.mmSaveDataResult Dim Result As String Dim OCustomer As New customerBusObj Try 'Make Sure the TableName is known so rename it just to be sure dsnew.Tables(0).TableName = "Customer" nResult = OCustomer.SaveDataSet(dsnew, "Customer") Result = nResult.ToString If nResult = OakLeaf.MM.Main.Business.mmSaveDataResult.Exception Then Result = OCustomer.Exception.Message & OCustomer.ConcurrencyExceptionMsg.CompleteMessage ' OCustomer.ResolveConcurrency() 'this doesnt work End If Catch ex As Exception Result = ex.Message End Try Return Result End FunctionOutput from the Debug window on the client side
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.Another user has changed theCustomer Data. Current data in the databaseABACOA ABACOA DEVELOPMENT COMPANY FLWPB 0000011 Proposed datadf ABACOA DEV COMPANY FLWPB 0000011 Do you want to overwrite the current data in the database with the proposed change?