Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB.net - Macro Substitution
Message
De
14/11/2010 14:51:38
 
 
À
14/11/2010 04:17:42
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01488984
Message ID:
01489078
Vues:
70
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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform