If you use this method
then you can form SQL WHERE like this:
string where = "UserName NOT LIKE N'public'";
// Do not select hidden users
where = SqlHelper.AddWhereCondition(where, "((UserIsHidden IS NULL) OR (UserIsHidden=0))");
ConnectionHelper.ExecuteQuery("somequeryname", null, where)
Don't forget query must contain ##WHERE##.
P.S. Try to pass null instead parameters if you don't want to use them. If null doesnt work try to pass new QueryDataParameters()
instead:
ConnectionHelper.ExecuteQuery("somequeryname", new QueryDataParameters(), where)
Take a look ExecuteQuery Overloads