Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linq Blues
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01613589
Message ID:
01613599
Views:
30
Many thanks.


>>Succeeded in getting this passed the editor. Note that customers is a DataTable.
>>
>>  IEnumerable<DataRow[]> r1 = (IEnumerable<DataRow[]>) customers.AsEnumerable().Where(r => (r["ID"] == ID));
>>
>>
>>now how do I get the first row cast as a DataRow?
>
>var Rows = customers.AsEnumerable().Where(r => (r["ID"] == ID));
>
>DataRow r1 = new DataRow();
>int i = 0
>foreach (var Row in Rows)
>
>{
>  if (i=0)
>    {
>     r1 = Row;
>     break;
>   }
>}
>
>from the top of my head - not tested.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform