Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the field name and the field value of a row
Message
From
13/01/2007 12:02:37
 
 
To
13/01/2007 09:52:50
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01185330
Message ID:
01185366
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform