FieldLikePredicate on field with spaces

Posts   
 
    
azag123
User
Posts: 4
Joined: 12-Mar-2013
# Posted on: 12-Mar-2013 10:27:12   

Hi,

I am performing a FieldLikePredicate call to do a LIKE search on a string field. Works fine if the field does not contain spaces, but fails if it does.

I'm using llblgen 2.6.

The code in use is :

var searchString = "%" + portName + "%"

filter.AddWithAdd(new FieldLikePredicate(PortFields.PortName, null, searchString));

Any ideas??

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 12-Mar-2013 19:30:39   

Please inspect the generated query and run it directly against the database. And also please post the exact runtime library version (build number).