Hi all
I've got a LINQ query where I've got an "optional" field that I may not want to query for... the reason being that I may not know the name of that field
I tried doing the following
Problem with this is that VSE is telling me that any reference to LINQ_QueryName downstream is invalid because that object is not declared... I can understand how this would be if I only defined it in one area of the IF but I've got it in both?
How would be the way to handle this? Can I append fields to select?
Many thanks!
-Justin
I've got a LINQ query where I've got an "optional" field that I may not want to query for... the reason being that I may not know the name of that field
I tried doing the following
VB.NET:
If (SomeCondition) then
Dim LINQ_QueryName = From Record in MyTable.AsEnumerable _ ETC
else
Dim LINQ_QueryName = From Record in MyTable.AsEnumerable _ ETC 2
End if
Problem with this is that VSE is telling me that any reference to LINQ_QueryName downstream is invalid because that object is not declared... I can understand how this would be if I only defined it in one area of the IF but I've got it in both?
How would be the way to handle this? Can I append fields to select?
Many thanks!
-Justin