none
Select Data from Dataset as LINQ RRS feed

  • Question

  • Hi I am new to LINQ and LAMBDA Expression.

    I am Creating a dataset rsMOP, which hold all my data from MOP Table.

     Dim Query = From ExchangeRate In rsMOP.Tables(0).AsEnumerable _
                        Where ExchangeRate.Field(Of String)("MOPName") = "CASH" And _
                        ExchangeRate.Field(Of Integer)("MOPTypeID") = 10 _
                        Select ExchangeRate

    Then I want to Retrieve the ExchangeRate  value from that Query

     I write like 

    For Each QVal In Query 

    Next

    But in that case throwing some error 
     Specified cast is not valid.

    So, What I have to do for retrive data ?





    • Moved by SamAgain Monday, July 19, 2010 3:32 AM much better fit (From:.NET Base Class Library)
    Saturday, July 17, 2010 10:08 AM

Answers

All replies