Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Me.Save is not working...
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01175472
Message ID:
01175980
Vues:
8
It's a webform with 3 tabs and 4 binded tables in a page.

The 1st tab is binded with Employee and Address tables, 2nd tab is binded with Employee and Employment record tables and the last tab is binded with Employee and Qualification tables.
As the Employee table is binded in all tabs, whenever there is any broken rules exist, it would be hard to indicate the invalid field value. So there is a validation function call whenever the tab index changed.

Here is my validation function.
Private Function ValidateAddress() As Boolean
        Dim saveResult As mmSaveDataResult
 
        Me.oAddress.TransactionBegin()
        saveResult = Me.Save(Me.oAddress)

        Select Case saveResult
            Case mmSaveDataResult.RulesPassed
                Me.oAddress.TransactionRollback()
                Return True
            Case mmSaveDataResult.RulesBroken
	       Me.oAddress.ResolveConcurrency()
                Me.oAddress.TransactionRollback()
                Return False  
            Case Else
                Me.oAddress.TransactionRollback()     
                Return False
        End Select
End Function
The validation functions are working fine. When it is actually saving the record in the Save Button click in the last tab, even the saveResult is RulePassed and commited, but the record is not inserted into the table. Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform