Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting a dataset
Message
From
18/07/2013 11:19:01
 
 
To
18/07/2013 10:42:43
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01578641
Message ID:
01578767
Views:
39
>>Nothing to do with SQL. If you want to iterate the table in the DataView order you need to use the DataView NOT the table
>
>Yes, I understand. I still do not understand why this is working as is when I create the dataset manually.

Shouldn't this:
   ' Sort the dataset into the primary key
                oData.oDataView.Sort = "AI"
 
                ' For each record
                For lnCounter = 0 To oData.nCount - 1
                    loRow = oData.oRows(lnCounter)
                Next
be:
oData.oDataView.Sort = "AI"
 
                ' For each record
                For lnCounter = 0 To oData.oDataView.Count - 1
                    loRow = oData.oDataView.Item(lnCounter)
                Next
(Haven't checked the exact syntax). Once again: you are looping through the table in the first case - the DataView may as well not exist.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform