Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I check the dataset row data duplicate?
Message
De
19/05/2011 02:49:29
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
How can I check the dataset row data duplicate?
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01511086
Message ID:
01511086
Vues:
81
Hi all,
i have a dataset. if i want the user entry same primary key and press add button , the program will check it and show the msgbox....
i think more time ,i can't check it, because i have 2 button (add ,delete ), if i chick the add button after do this function , after i go to exits record
will appear problem ......
.....How can i do ,thank you ?
 Function checkDatasetExists(ByVal data As String) As Boolean

            For i = 0 To WilsonDataSet.company.Count - 1
                If Trim(WilsonDataSet.company.Rows(i).Item("Compid")) = Trim(data) Then
                    Return True
                    Exit Function
                End If
            Next
  
    End Function
Répondre
Fil
Voir

Click here to load this message in the networking platform