Hi Otis
Thanks for the reply, sorry if this is getting a confusing thread, I hope I am not doing anything stupid. The following code is the one that produces the ansi string, you can substitue the bit variable for 0x01 to get the int32 result being passed as a parameter, however in both cases I get no rows returned. But in query analyzer I get the correct rows returned.
Again thanks for your reply, after last night's game I would be in no mood to come to work!
I think I closed the last thread off, let me know if there is anything else you may need.
Cheers
Rich
Filter Generation
IPredicateExpression filter = new PredicateExpression();
//option filter
if (SearchCheckedOptionsOnly) {
//The new filter to use
for(int i=0; i < 32; i++) {
ulong bit = (ulong)System.Math.Pow(2, i);
if ((bit & CheckedOptions) > 0) {
filter.Add(CustomerOptionFields.Cop_checkoptions.SetExpression(new Expression(CustomerOptionFields.Cop_checkoptions, ExOp.BitwiseAnd, bit)) == bit);
}
}
return filter;
}
Call to populate the collection (Calls the above code)
StockCollection collection = new StockCollection();
if (search.SearchStockIdsOnly && search.StockIds.Count == 0) {
///return a list of null as we should only return stockids
return collection;
}
IPredicateExpression filter = search.GenerateFilter();
SortExpression sorter = search.GenerateSort();
collection.GetMulti(filter, search.PageSize, sorter, null, search.CurrentPage+1, search.PageSize);