Server Error in '/store2' Application.

There is no row at position 0.

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.IndexOutOfRangeException: There is no row at position 0.

Source Error:


Line 330:<%'Query Shop name 
Line 331:     Dim t as DataTable
Line 332:     Dim ShopName As String =Query.From("SELECT * FROM Shops WHERE ID=@p1",listshopID).Rows(0)("Name")
Line 333:%>
Line 334:

Source File: D:\WebsiteMK\mk.net\store2\index.aspx    Line: 332

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2123463
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   ASP.index_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\WebsiteMK\mk.net\store2\index.aspx:332
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +13
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1303


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3062.0