Server Error in '/' Application.

Accessor is invalid.

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.OleDb.OleDbException: Accessor is invalid.

Source Error:


Line 225:			cmd.CommandType = CommandType.Text;
Line 226:			cmd.Connection = GetConnection();
Line 227:			int tmpCount = Int32.Parse(cmd.ExecuteScalar().ToString());			
Line 228:			Close();
Line 229:			if (tmpCount < 1)

Source File: d:\wwwrootV2\CottonPro\App_Code\Proxy\CateProxy.cs    Line: 227

Stack Trace:


[OleDbException (0x80040e00): Accessor is invalid.]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1007648
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +255
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +188
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +161
   System.Data.OleDb.OleDbCommand.ExecuteScalar() +116
   CateProxy.IsExistSubCate(Int32 id) in d:\wwwrootV2\CottonPro\App_Code\Proxy\CateProxy.cs:227
   MasterPage.dlCateList_ItemDataBound(Object sender, DataListItemEventArgs e) in d:\wwwrootV2\cottonpro\MasterPage.master.cs:115
   System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e) +8770710
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +137
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +459
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +54
   System.Web.UI.WebControls.BaseDataList.DataBind() +55
   System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +60
   System.Web.UI.WebControls.BaseDataList.CreateChildControls() +69
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


Version Information: Microsoft .NET Framework Version:2.0.50727.8784; ASP.NET Version:2.0.50727.8762