I'm having some trouble with case insensitive searching. From what I read about here, I think I am doing this right. Here is a snippet of my llblgen code:
Dim dap As New DataAccessAdapter
Dim bucket As New RelationPredicateBucket
Dim entities As New EntityCollection(New HazmatEntityFactory)
Dim p As FieldLikePredicate
bucket.Relations.Add(HazmatEntity.Relations.RegulationEntityUsingRegulationID)
bucket.PredicateExpression.Add(PredicateFactory.CompareValue(LLBL.RegulationFieldIndex.RegulationName, ComparisonOperator.Equal, regset))
If (psn.Length > 0) Then
p = PredicateFactory.Like(LLBL.HazmatFieldIndex.PSN, "%" + psn.ToUpper + "%")
p.CaseSensitiveCollation = True
bucket.PredicateExpression.AddWithAnd(p)
End If
dap.FetchEntityCollection(entities, bucket)
Everytime I run it, it gives me an empty collection even though I put in a paramater (the string 'psn') that I know exisits in my table. Here is my table creation:
Create Table tblHZ (
HZID Integer NOT NULL,
PSN Varchar(252) NOT NULL COLLATE ASCII,
UNID Varchar(50) NOT NULL COLLATE ASCII,
Class Varchar(20) NOT NULL COLLATE ASCII,
Group Varchar(50) NOT NULL COLLATE ASCII,
Data Varchar(2000),
RegulationID Integer NOT NULL,
HZHashKey Varchar(64) NOT NULL UNIQUE,
Primary Key (HazmatID)
);
Is there something that I am missing?