How to simplfy a data record

  • Thread starter Thread starter Des
  • Start date Start date
D

Des

When I used asp I would use the line rsCustomers("<field name>") which
is easy. I have to
write

sDescription = DataSet.Tables("ITEM").Rows(0)("Description")
sName = DataSet.Tables("ITEM").Rows(0)("Name")
dCost = DataSet.Tables("ITEM").Rows(0)("Cost")

instead of

sDescription = rsCustomers("Description")
sName = rsCustomers("Name")
dCost = rsCustomers("Cost")

Can this be done in dot net ?
 
Hi Des,

I think this simplified mode access was availabale only in a "movenext" cycle.
You do the same thing in .net.

Here is a csharp code:

string xx;
foreach(DataRow row in DataSet.Tables["ITEM"].Rows)
{
xx= row["Name"];
}


Best regards,
Lajos
 
Back
Top