Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web Service
Message
From
15/02/2006 10:44:19
 
 
To
14/02/2006 20:25:43
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01096380
Message ID:
01096476
Views:
12
I am making some progress on this.

Using the following code I am able to attempt to update a record however it gets caught up in the concurrency handler. How would I handle this?
   <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 Function
Output 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?
Previous
Reply
Map
View

Click here to load this message in the networking platform