version 1.0.2005.1 final (self-servicing)
VS2005 asp.net 2.0
hiya,
I need to cast the result of a GetScalar to a decimal.Obviously, if no results are returned, then I'll get an error.
Below is my code, I have tried to check for null, but that doesn't seem to work.Maybe thre is something in-built that will let me do this?
Many thanks,
yogi
if ((collOrderItems.GetScalar(CskStoreOrderItemFieldIndex.ProductId, CskStoreOrderItemFields.Quantity * CskStoreOrderItemFields.PricePaid, AggregateFunction.Sum, filtNonSpecialDelivery, relationsToUse, null))!= null)
{
decimal NONspecialDeliveryTotal = (decimal)collOrderItems.GetScalar(CskStoreOrderItemFieldIndex.ProductId, CskStoreOrderItemFields.Quantity * CskStoreOrderItemFields.PricePaid, AggregateFunction.Sum, filtNonSpecialDelivery, relationsToUse, null);
}