Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with collections
Message
From
27/06/2010 16:29:45
 
 
To
27/06/2010 16:12:38
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01470724
Message ID:
01470725
Views:
32
The problem was caused because loObject was used in the uniqueness of the first method. When I changed it to this, it worked:
    ' Add a distributor
    ' expN1 Distributor primary key
    ' expN2 Handling fee
    Private Function AddDistributor(ByVal tnNoDistributor As Integer, ByVal tnHandlingFee As Double) As Boolean
        Dim lnNoDistributor As Integer = 0
        Dim loObject(2) As Object
        Dim loObject2(2) As Object

        ' See if it already exists
        For Each loObject2 In oDistributor
            lnNoDistributor = loObject2(1)

            ' If this is the one
            If lnNoDistributor = tnNoDistributor Then
                Return True
            End If

        Next

        loObject(1) = tnNoDistributor
        loObject(2) = tnHandlingFee

        oDistributor.Add(loObject)
        Return True
    End Function
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform