Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Web Service
Message
De
15/02/2006 10:44:19
 
 
À
14/02/2006 20:25:43
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01096380
Message ID:
01096476
Vues:
11
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform