Server Error in '/' Application.
Object cannot be cast from DBNull to other types.
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: Object cannot be cast from DBNull to other types.
Source Error:
Line 24: int cars = Convert.ToInt32(DataHelper.ExecuteScalar("SELECT [oid] FROM [wap_manage] WHERE [id]=" + id + " AND [uid]=" + NuoHa.MyId + ""));
Line 25: int car = Convert.ToInt32(DataHelper.ExecuteScalar("SELECT [gz] FROM [wap_manage_config] WHERE [id]=" + cars + ""));
Line 26: int ca = Convert.ToInt32(DataHelper.ExecuteScalar("SELECT [g] FROM [wap_manage] WHERE [uid]=" + NuoHa.MyId + ""));
Line 27:
Line 28: if (car == 0)
Source File: d:\www\web\txqq789.com_cgopekleedexhf0t04oz\wwwroot\wml\bbs\gov\manage\manage_glgz.aspx.cs Line: 26
Stack Trace:
[InvalidCastException: Object cannot be cast from DBNull to other types.]
System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) +56
System.Convert.ToInt32(Object value) +28
bbs_gov_manage_manage_glgz.Page_Load(Object sender, EventArgs e) in d:\www\web\txqq789.com_cgopekleedexhf0t04oz\wwwroot\wml\bbs\gov\manage\manage_glgz.aspx.cs:26
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
System.Web.UI.Control.OnLoad(EventArgs e) +61
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2645
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249