Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the field name and the field value of a row
Message
De
13/01/2007 12:02:37
 
 
À
13/01/2007 09:52:50
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01185330
Message ID:
01185366
Vues:
13
>Ah, but you do ... if the DataRow came from a table to begin with, then it has a table property that tells you what that table was. You can then do this:
>
>
>string ColumnName;
>object ColumnValue;
>for (int i=0; i < MyRow.Table.Columns.Count; i++)
>{
>    ColumnName  = MyRow.Table.Columns[i].ColumnName;
>    ColumnValue = MyRow[i];
>    // -or- ColumnValue = MyRow[ColumnName]; -- either way --
>}
>
Thanks
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform