找不到資料表 0。

'/' 應用程式中發生伺服器錯誤。

找不到資料表 0。

描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外詳細資訊: System.IndexOutOfRangeException: 找不到資料表 0。

原始程式錯誤:


行 149:
行 150:            sql = "SELECT * from T_BookSeedSpace where SpaceId = " + ddlAddress.SelectedValue + " and SpaceDate = '" + i + "'";
行 151:            DataTable dt1 = objSpaceTempDAL.GetDateSet(sql).Tables[0];
行 152:            sql = "SELECT * from T_BookSeedSpaceDetail where SpaceId = " + ddlAddress.SelectedValue + " and SpaceDate = '" + i + "' and SeedID = '" + SeedId + "' ";
行 153:            DataTable dt2 = objSpaceTempDAL.GetDateSet(sql).Tables[0];

原始程式檔: d:\TCF_Site\NEW_AP\AP\106taipeifringe.Web\Register\PlaceBookingInfo.aspx.cs    行: 151

堆疊追蹤:


[IndexOutOfRangeException: 找不到資料表 0。]
   System.Data.DataTableCollection.get_Item(Int32 index) +92
   Register_PlaceBookingInfo.GridView1Bind() in d:\TCF_Site\NEW_AP\AP\106taipeifringe.Web\Register\PlaceBookingInfo.aspx.cs:151
   Register_PlaceBookingInfo.BindAdr() in d:\TCF_Site\NEW_AP\AP\106taipeifringe.Web\Register\PlaceBookingInfo.aspx.cs:74
   Register_PlaceBookingInfo.BindPlace() in d:\TCF_Site\NEW_AP\AP\106taipeifringe.Web\Register\PlaceBookingInfo.aspx.cs:63
   Register_PlaceBookingInfo.Page_Load(Object sender, EventArgs e) in d:\TCF_Site\NEW_AP\AP\106taipeifringe.Web\Register\PlaceBookingInfo.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
   MaxBasePage.OnLoad(EventArgs e) in d:\TCF_Site\NEW_AP\AP\106taipeifringe.Web\App_Code\BasePage.cs:152
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


版本資訊: Microsoft .NET Framework 版本:2.0.50727.4200; ASP.NET 版本:2.0.50727.4205