select top 1 parentNo from category where val=(select id from productInfo where productNo=265)
Conversion from type 'DBNull' to type 'String' is not valid.

 


Operator '>' is not defined for type 'DBNull' and type 'DBNull'.

Server Error in '/' Application.

Operator '>' is not defined for type 'DBNull' and type 'DBNull'.

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 type 'DBNull'.

Source Error:


Line 616:	else
Line 617:		response.write ("<h2>")
Line 618:		if rs1("mNon_Member_Price")>rs1("mSelected_User_Price") then
Line 619:			response.write ("<s style='padding-right: 20px; font-size: 12px; color: red;'>" & formatCurrency(rs1("mNon_Member_Price")) & "</s>") 
Line 620:		end if

Source File: D:\Webs\dan.org\dive-store\default.aspx    Line: 618

Stack Trace:


[InvalidCastException: Operator '>' is not defined for type 'DBNull' and type 'DBNull'.]
   Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectGreater(Object Left, Object Right, Boolean TextCompare) +515831
   ASP.dive_store_default_aspx.productInfo() in D:\Webs\dan.org\dive-store\default.aspx:618
   ASP.dive_store_default_aspx.productView() in D:\Webs\dan.org\dive-store\default.aspx:455
   ASP.dive_store_default_aspx.page_load() in D:\Webs\dan.org\dive-store\default.aspx:197
   System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) +8
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +8750995
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.3655; ASP.NET Version:2.0.50727.3658