Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting from a datatable
Message
From
26/10/2006 17:17:59
 
 
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01164032
Message ID:
01164863
Views:
8
>The defaultview has a sort property...
>
>MyDataSet.Tables[0].DefaultView.Sort = "mysortcolumn";
>
>let me know if that works...

After having looked into it, here is how I create the datatable:
        ' Take distinct values from a column and return them as datatable
        ' 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
So, at this point, I have a datatable. I am not sure how to move from here to a dataset in order to execute your command.
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
Next
Reply
Map
View

Click here to load this message in the networking platform