Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting from a datatable
Message
From
24/10/2006 01:50:22
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
Sorting from a datatable
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01164032
Message ID:
01164032
Views:
64
I have this method which generates a datatable on all unique values of a column from a dataset:
        ' Take distinct values from a column and return them into a Rows() object
        ' expO1 Dataset
        ' expC1 Table
        '       Optional
        '       Default is Temp
        ' expC2 Column name
        Public Function DistinctValue(ByVal toDataSet As DataSet, _
         Optional ByVal tcTable As String = "Temp", _
         Optional ByVal tcColumn As String = "") As Boolean
            Dim lcColumnArray As String = ""
            lcColumnArray = tcColumn
            Try
                oDataTable = toDataSet.Tables(tcTable).DefaultView.ToTable(tcTable, True, lcColumnArray.ToCharArray)
            Catch loError As Exception
                DataError(loError, oApp.Debug(loError.Message))
                Return False
            End Try
            Return True
        End Function
But, I would like to sort that on the column. What would need to be adjusted to accomplish that?
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
Next
Reply
Map
View

Click here to load this message in the networking platform