Server Error in '/' Application.

Data is Null. This method or property cannot be called on Null values.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.

Source Error:


Line 80:                 .Id = dataReader.GetInt32(0)
Line 81:                 .itemName = dataReader.GetString(1)
Line 82:                 .itemDescription = dataReader.GetString(2)
Line 83:                 .itemPriceCZK = dataReader.GetInt32(3)
Line 84:                 .catID = dataReader.GetInt32(4)

Source File: D:\Sites\web_283551217199152984865955\www\App_Code\shop\shop.vb    Line: 82

Stack Trace:


[SqlNullValueException: Data is Null. This method or property cannot be called on Null values.]
   System.Data.SqlClient.SqlBuffer.get_String() +1809179
   System.Data.SqlClient.SqlDataReader.GetString(Int32 i) +132
   Shop.getShopItem(Int32 itemId) in D:\Sites\web_283551217199152984865955\www\App_Code\shop\shop.vb:82
   Modules_shopDetail.shopItemBind() in D:\Sites\web_283551217199152984865955\www\Modules\shopDetail.ascx.vb:67
   Modules_shopDetail.Page_Load(Object sender, EventArgs e) in D:\Sites\web_283551217199152984865955\www\Modules\shopDetail.ascx.vb:55
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0