views:

40

answers:

1

The below code will fill User Records in "users".

    Dim users= From p In oDbUser.USERs Where p.STATE= "MI" And p.STATUS = 1

Can anyone tell me how can i use a foreaach loop in the result and take each indidual row items ?

+2  A: 

I think you also need a Select clause in that linq query.

And that is the most relevant part, assuming a simple Select p you can do

For Each user In users 

Next user

(you may want to check the VB syntax)

Henk Holterman
Its is For Each element in elements .... Next element. Not End ForEach.
Geoffrey Van Wyk
@Geoffrey, Thanks, I will edit. I did warn about my VB skills.
Henk Holterman