select top 1 parentNo from category where val=(select id from productInfo where productNo=181)
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 615:	else
Line 616:		response.write ("<h2>")
Line 617:		if rs1("mNon_Member_Price")>rs1("mSelected_User_Price") then
Line 618:			response.write ("<s style='padding-right: 20px; font-size: 12px; color: red;'>" & formatCurrency(rs1("mNon_Member_Price")) & "</s>") 
Line 619:		end if

Source File: D:\Webs\\dive-store\default.aspx    Line: 617

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\\dive-store\default.aspx:617
   ASP.dive_store_default_aspx.productView() in D:\Webs\\dive-store\default.aspx:456
   ASP.dive_store_default_aspx.page_load() in D:\Webs\\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