DBNull error on Live site. Site down


https://forum.kartris.com/Topic338.aspx
Print Topic | Close Window

By footie - Sat 8 Jan 2011

While testing out adding a product to the shopping cart on the live site, I received the message:


Error!

An error occurred. The system has written a log file entry.


When checking the log, I find the following Error message referring to a DBNull error:


----------------------------------------------------------------------------

>>     URL:http://angelwingscompany.com/Product.aspx?ProductID=11&L=1

>>     Page:

-----------------------------------------------------------------------------

>>     1/8/2011 3:56:57 AM

>>     98.200.145.30

>>     DESCRIPTION:

System.InvalidCastException: Conversion from type 'DBNull' to type 'Double' is not valid.

   at Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)

   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)

   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)

   at Product.Page_LoadComplete(Object sender, EventArgs e)

   at System.EventHandler.Invoke(Object sender, EventArgs e)

   at System.Web.UI.Page.OnLoadComplete(EventArgs e)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Now when I try going on to the site not even the Default.aspx page will display.  It generates a similar error.  I'm assuming its an issue with the product, but when editing the product in the Admin, it edits fine.  Not sure where the DBNull value is that its referring too.

Subsequent Error messages are logged referring to the Basket.  Take a look:


-----------------------------------------------------------------------------

>>     URL:http://angelwingscompany.com/Basket.aspx

>>     Page:

-----------------------------------------------------------------------------

>>     1/8/2011 3:57:08 AM

>>     98.200.145.30

>>     DESCRIPTION:

System.InvalidCastException: Conversion from type 'DBNull' to type 'Double' is not valid.

   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object Value, NumberFormatInfo NumberFormat)

   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object Value)

   at BasketBLL.LoadBasketItems()

   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)


-----------------------------------------------------------------------------

>>     URL:http://angelwingscompany.com/default.aspx

>>     Page:

-----------------------------------------------------------------------------

>>     1/8/2011 4:03:06 AM

>>     98.200.145.30

>>     DESCRIPTION:

System.InvalidCastException: Conversion from type 'DBNull' to type 'Double' is not valid.

   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object Value, NumberFormatInfo NumberFormat)

   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(Object Value)

   at BasketBLL.LoadBasketItems()

   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)


Is this a Basket issue or an issue with the Product Data?

By footie - Sun 9 Jan 2011

I tried this again today.  Adding a product to the Basket.  The basket does not update and when I click on the link to view the basket I received this error:


----------------------------------------------------------------------------
>>     URL:http://angelwingscompany.com/Product.aspx?ProductID=12&L=1
>>     Page:
-----------------------------------------------------------------------------
>>     1/9/2011 6:05:48 AM
>>     98.200.145.30
>>     DESCRIPTION:
System.InvalidCastException: Conversion from type 'DBNull' to type 'Double' is not valid.
   at Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
   at Product.Page_LoadComplete(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Page.OnLoadComplete(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

==================================================
By Paul - Thu 13 Jan 2011
can you confirm which version of kartris you are using? (minor version)
By footie - Fri 14 Jan 2011
Version 1.2000
By Medz - Tue 18 Jan 2011
Hi, can you try to execute this query in the backend and see if it fixes the issue?

* navigate to backend -> configuration -> database admin -> run query tab


DISABLE TRIGGER [dbo].[trigKartrisVersions_DML] ON [dbo].[tblKartrisVersions];UPDATE [dbo].[tblKartrisVersions] SET V_Weight = 0 WHERE V_Weight IS NULL;UPDATE [dbo].[tblKartrisVersions] SET V_RRP = 0 WHERE V_RRP IS NULL;UPDATE [dbo].[tblKartrisVersions] SET V_CustomizationCost = 0 WHERE V_CustomizationCost IS NULL;ENABLE TRIGGER [dbo].[trigKartrisVersions_DML] ON [dbo].[tblKartrisVersions]


Regards,

Medz
By footie - Sat 22 Jan 2011
That didnt work.  Same error.  Guess its time to move to another platform. 
By Mart - Sat 22 Jan 2011
Is it possible you can zip up the db and send me a link (private message) to download it?

It'll be much easier for us to see whats going wrong.