Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sorting a dataset
Message
De
18/07/2013 11:54:41
 
 
À
18/07/2013 11:50:02
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:
01578781
Vues:
46
>>I don't either :-}
>>What is the order of the manually created table when there's no DataView ?
>
>It was mentioned earlier that this could have been a coincidence in the way the records were added and the sort I was assigning to. However, I am using this approach at various locations, such as getting a directory list of all the files from a directory and applying a sort after. This one is not a SQL select as I am adding each file one by one in the dataset. Then, I can apply a sort on various columns I have in this class. But, thinking more about it, by default, a directory list of a directory will return files in alpha order and most of the time I am using a sort on the Name column. So, yes, if I would look deeper, maybe this was all a coincidence after all.

That would explain it :-}

>Now, thinking more about it, if I would like to preserve the same way of doing things but having the Data class to act upon a .Sort value change, it would be as if I would have to select from the actual dataset into a new one but in the order I want, which would then allow me to use the same For\Next approach I am using everywhere. But, that would be an extra step while scanning the dataview would remain the best approach.

If the underlying tables are not going to change once loaded then I'd favour Rob's suggestion to use Linq. If the data *can* change then the dynamic aspect of the DataView makes it the best option....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform