Hello,
First time poster, so hopefully I get you the information you need to help...
I am using v2.6
I am trying to create a PredicateExpression that will compare a byte array, named password, created in code to a varbinary(250) field, named Password, stored in a SQL-Server table.
Some sample code:
Private Shared Function ValidateUserAccount(ByVal password As Byte()) As Boolean
Dim passwordPredicateBucket As New RelationPredicateBucket()
passwordPredicateBucket.PredicateExpression.Add(CandidateResumeFields.Password = password)
Dim candiateEmailAddressResumeCollection As New EntityCollection(Of CandidateResumeEntity)(New CandidateResumeEntityFactory())
candiateEmailAddressResumeCollection = GetEntityCollection(CandidateResumeGraphType.SingleEntity, passwordPredicateBucket)
.
.
.
Return something
End Function
I have obviously left out some parts of the code, but the code does work when I create a PredicateExpression comparing strings or any other value really. It's just when I try to get the VarBinary type involved.
I am pretty sure the "password" variable being passed into the function is a properly formatted Byte array. Part of my reason for this belief is that I have been successful in storing the value into the SQL-Server table as a byte array using the same "password" value.
The error I get happens on the candiateEmailAddressResumeCollection = GetEntityCollection(CandidateResumeGraphType.SingleEntity, passwordPredicateBucket) line and is:
An exception was caught during the execution of a retrieval query: Failed to convert parameter value from a Byte to a Byte[].. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.
I am somewhat lost.
Thanks in advance for any assistance...
Thanks,
Gary