Hey everyone, I am trying to accomplish something like the example below. I know you can accomplish the same task in a different way (as shown in example 2) but this will not work in my case. I am collecting the column name at runtime so I cannot strongly type (if that is the correct terminology) the column name. Any help would be greatly appreciated.
Example 1 (does not work)
Example 2 (does work but not what I need)Code:Dim MyCustomer = From Customer In DB.Customers _ Where Customer.ID = 1 _ Select Customer MsgBox(MyCustomer.First.Item("Name").ToString) <----- No "Item" property
Code:Dim MyCustomer = From Customer In DB.Customers _ Where Customer.ID = 1 _ Select Customer MsgBox(MyCustomer.First.Name)




Reply With Quote