Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting a dataset
Message
De
18/07/2013 11:19:01
 
 
À
18/07/2013 10:42:43
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01578641
Message ID:
01578767
Vues:
38
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform