Last post Feb 16, 2010 06:59 AM by Saravanan M
Feb 16, 2010 01:46 AM|pinga123|LINK
I m writing a small web page with user name as an input.
Depends on the username a list of users will get displayed along with their attributes.
Input name as John will cause following result.
JohnDev Newyork John@yahoo.com
JohnVen London JKmour@yahoo.com
JohnKen London JUour@yahoo.com
But this search results nothing if we put surname instead of name as filter is on samaccountname.
Dim UserName As [String] = "*" & TextBox1.Text & "*"
deSearch.Filter = "(&(objectCategory=user)(samaccountname=" & UserName & "))"
How would i add one more filter on surname(Which attribute should i use and in what way).
Feb 16, 2010 06:17 AM|vijay_010237866|LINK
select * from tbl1 where username like '%' + @username + '%'
Feb 16, 2010 06:32 AM|mcr_subbu|LINK
In SQL u should use percentile. Not "*".
select * from tblUser where username like '%John%'
Feb 16, 2010 06:39 AM|pinga123|LINK
I m not using sql query its just a syntax of filter .
Feb 16, 2010 06:59 AM|Saravanan M|LINK
Filter property should be set by the following expression
"UserName LIKE '*John*' or surname LIKE '*John*'"