Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I check the dataset row data duplicate?
Message
From
19/05/2011 02:49:29
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
How can I check the dataset row data duplicate?
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01511086
Message ID:
01511086
Views:
79
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
Reply
Map
View

Click here to load this message in the networking platform