Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper way to sort a dataset
Message
From
17/05/2006 16:53:34
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Proper way to sort a dataset
Environment versions
Environment:
VB 8.0
Miscellaneous
Thread ID:
01123003
Message ID:
01123003
Views:
61
To sort a dataset, I am doing presently this:
    ' Sort the dataset
    ' expC1 Field
    Public Function Sort(ByVal tcField As String) As Boolean
        oDataView = oDataSet.Tables(0).DefaultView
        oDataView.Sort = tcField
        Return True
    End Function
Then, I am using this to loop through the data view:
        For Each loRowDataView In loFileDirectory.oDataView
            cHtml = cHtml + loRowDataView("Name")
        Next
It works but I was wondering if there could be another way by simply always using the dataset. Because, originally, I had this when I was working on the dataset without any sort:
        For Each loRow In loDataProvider.oDataSet.Tables(0).Rows
            cHtml = cHtml + loRow("Name")
        Next
So, I am wondering if I can still use the dataset direct access to get my data once the dataset has been sorted? Because, the only way I have found so far was to use the view functionality of the dataset to get my data.
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