Case Sensitivity - LLBLGen 2.6.

Posts   
 
    
mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 25-Sep-2009 22:31:12   

Hello Everyone,

We have a SQL Server with case-insensitivity... is there a way to make LLBLGen perform, case sensitive queries - in particular with password searches?

I see there is a CaseSensitiveCollation property... but it's supposed to be used to enable case insensitive queries?

Any way of making LLBLGen Case "selectively" case sensitive?

Thanks!

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Sep-2009 05:12:06   

Normally the people wants: from case-sensitive to case-sensitive queries.

The thing is, LLBLGen will translate the predicates into sql code. So, ultimately the query willl run in your case-insensitive server.

What if you collate your specific table to case-sensitive.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 26-Sep-2009 13:13:48   

The predicates have no notion of case sensitivity. So if you pass in a value 'Foo' and also a value 'foo' and you use it in a predicate on a case sensitive db, it will give different results. On a case insensitive db, it will give the same results.

The case-sensitive collaction property is meant to signal that the predicate is to be used in a case sensitive collaction environment, and you want to mitigate that fact, so UPPER() is added to make it act as if case insensitive. The property name is perhaps a bit ambiguistic.

What you want can only be achieved with a case sensitive collaction (as the filtering is done by the db, which thus means it has to use case-sensitive logic). In sqlserver you can achieve case sensitive collations by defining them on the catalog, table or field. So if you give your password field a case sensitive collation it should work without you changing any llblgen pro query code simple_smile

Frans Bouma | Lead developer LLBLGen Pro