Error : Conversion from type 'DBNull' to type 'Boolean' is not valid

Posted By Neil Fri 30 Sep 2011
Add to Favorites0

Error : Conversion from type 'DBNull' to type 'Boolean' is not valid

Author Message
Neil
 Posted Fri 30 Sep 2011
Supreme Being

Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)

Group: Forum Members
Last Active: Sat 3 Nov 2018
Posts: 192, Visits: 5,220
Hi, we seem to be getting the following error frequently. Any ideas?

-----------------------------------------------------------------------------
>>     URL:http://www.mtmc.co.uk/Product.aspx?ProductID=58108&CategoryID=12732401&strParent=73,12732400&L=1
>>     Page:
-----------------------------------------------------------------------------
>>     30/09/2011 15:42:01
>>     180.76.5.165
>>     DESCRIPTION:
System.InvalidCastException: Conversion from type 'DBNull' to type 'Boolean' is not valid.
   at Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(Object Value)
   at BasketBLL.GetCouponDiscount(String strCouponCode, String& strCouponError, String& strCouponType, Double& numCouponValue)
   at BasketBLL.CalculateCoupon(String strCouponCode, String& strCouponError, Boolean blnZeroTotalTaxRate)
   at Templates_BasketView.LoadBasket()
   at Templates_BasketView.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

==================================================
Fri 30 Sep 2011 by Neil
saturation
 Posted Fri 30 Sep 2011
Supreme Being

Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)Supreme Being - (66,802 reputation)

Group: Forum Members
Last Active: Fri 30 Nov 2012
Posts: 108, Visits: 1,185
Are you able to replicate the error by clicking on the same thing?   If so, what is it you are clicking on that is generating the error?
Paul
 Posted Fri 30 Sep 2011
große Käse

große Käse - (523,834 reputation)große Käse - (523,834 reputation)große Käse - (523,834 reputation)große Käse - (523,834 reputation)große Käse - (523,834 reputation)große Käse - (523,834 reputation)große Käse - (523,834 reputation)große Käse - (523,834 reputation)große Käse - (523,834 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
I clicked the link and the page didn't appear to error for me. The trace includes some info relating to coupons - do you have any coupons live? Is it possible to set up a reusable test coupon with minimal value to test with?

--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
Neil
 Posted Sat 1 Oct 2011
Supreme Being

Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)

Group: Forum Members
Last Active: Sat 3 Nov 2018
Posts: 192, Visits: 5,220
It is odd, when it errors, every page load seems to throw it until I recycle the application pool (to be honest I have never left it long enough to see if it cures itself). We have never used coupons at all, but will try and see if I can reproduce. I wonder if a db field type is incorrect?
Sat 1 Oct 2011 by Neil
Neil
 Posted Sat 1 Oct 2011
Supreme Being

Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)Supreme Being - (127,007 reputation)

Group: Forum Members
Last Active: Sat 3 Nov 2018
Posts: 192, Visits: 5,220
Just checked and we did have an old live 'test' coupon that has expired in 2010. Have deleted that. Will see if it happens again...

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top