[IndexOutOfRangeException: 无法找到表 0。]
System.Data.DataTableCollection.get_Item(Int32 index) +92
SportswearDAL.O_GoodsType.Search(Int32 PageSize, String strWhere, String strColNames, Int32 PageCurrent, String strOrder) in F:\asp.net(三层架构)运动商城\asp.net(三层架构)运动商城\Sportswear\SportswearDAL\O_GoodsType.cs:182
SportswearDAL.O_GoodsType.Search(String strWhere, String strColNames, Int32 PageCurrent, String strOrder) in F:\asp.net(三层架构)运动商城\asp.net(三层架构)运动商城\Sportswear\SportswearDAL\O_GoodsType.cs:170
index.myBind() in f:\asp.net(三层架构)运动商城\asp.net(三层架构)运动商城\Sportswear\SportswearWeb\index.aspx.cs:31
index.Page_Load(Object sender, EventArgs e) in f:\asp.net(三层架构)运动商城\asp.net(三层架构)运动商城\Sportswear\SportswearWeb\index.aspx.cs:24
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
就是个下标越界异常,要看你具体的代码。看看连接参数那些是否有问题。
可以设置断点调试一下,应该是数据没有安照预想的方式查出来,预想也许能查出1个,但是实际上查出0个
就去这个方法里找,断点逐步调试:
SportswearDAL.O_GoodsType.Search(Int32 PageSize, String strWhere, String strColNames, Int32 PageCurrent, String strOrder) in F:\asp.net(三层架构)运动商城\asp.net(三层架构)运动商城\Sportswear\SportswearDAL\O_GoodsType.cs:182