Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB.net - Macro Substitution
Message
From
14/11/2010 14:51:38
 
 
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01488984
Message ID:
01489078
Views:
72
Trying to translate your example into my code, i came up with the following - still getting the error "Method 'Boolean OptionCheck_WithArray(Int32)' has no supported translation to SQL."
Dim result_Match =
            (From Row In result_0
            Where OptionCheck_WithArray(Row.SecurityCode)
            Select Row).ToList()

Public Function OptionCheck_WithArray(ByVal n_Value2 As Integer) As Boolean
        ' TODO: need to loop through array
        Return If((n_Value2 And SecurityCodes(0)) = SecurityCodes(0), True, False)
End Function
The result_0 list/collection is the result of my earlier select and has records. It also has a value of 102 (in this example) in the SecurityCode field for all the records.

The SecurityCodes(0), used in the function, has a value of 4. This is collected earlier in the program from the Active Directory for that specific user. So the function should return a true in this case - not that this really matters right now, because LINQ does not like me calling that function.

Thanks for all your help!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform