Server Error in '/' Application.

Operator '<>' is not defined for type 'DBNull' and string "".

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.InvalidCastException: Operator '<>' is not defined for type 'DBNull' and string "".

Source Error:


Line 100:            ViewState("img") = ds.Tables(0).Rows(0)("VR_IMAGE1")
Line 101:
Line 102:            If ds.Tables(0).Rows(0)("VR_PCODE") <> "" Then
Line 103:                tr_pc.Visible = True
Line 104:                Me.Label7.Text = ds.Tables(0).Rows(0)("VR_PCODE")

Source File: E:\Inetpub\Craftcluster\site\ProductDetails.aspx.vb    Line: 102

Stack Trace:


[InvalidCastException: Operator '<>' is not defined for type 'DBNull' and string "".]
   Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectNotEqual(Object Left, Object Right, Boolean TextCompare) +182
   site_ProductDetails.productdetails() in E:\Inetpub\Craftcluster\site\ProductDetails.aspx.vb:102
   site_ProductDetails.Page_Load(Object sender, EventArgs e) in E:\Inetpub\Craftcluster\site\ProductDetails.aspx.vb:27
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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