Server Error in '/' 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 23: 			dbTable = "sub4"
Line 24: 		ElseIf Request("sub3") = "" And Request("sub2") <> "" Then
Line 25:             Dim s1check As DataRow = dbh.GetData("select * from sub1 where sub1pagename='" & Request("sub1") & "'").Rows(0)
Line 26:             p = New page1("sub2 where sub2canbeseen='True' and sub2Pagename='" & Request("sub2") & "' and sub1_id1=" & s1check("sub1id1"), "products")
Line 27: 			SubsFound = dbh.GetData("select * from proionta,sub4,sub3,sub2,sub1 where sub2_id1=" & p.id1 & " and sub1canbeseen='True' and sub1_id1=sub1id1 and sub2canbeseen='True' and sub2_id1=sub2id1 and sub3canbeseen='True' and sub3_id1=sub3id1 and sub4canbeseen='True' and sub4_id1=sub4id1 and proiontacanbeseen='True'")

Source File: C:\Inetpub\vhosts\carpetfloor.gr\httpdocs\products.aspx    Line: 25

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2519554
   System.Data.DataRowCollection.get_Item(Int32 index) +20
   ASP.products_aspx.Page_Init(Object sender, EventArgs e) in C:\Inetpub\vhosts\carpetfloor.gr\httpdocs\products.aspx:25
   System.Web.UI.Control.OnInit(EventArgs e) +108
   System.Web.UI.Page.OnInit(EventArgs e) +17
   System.Web.UI.Control.InitRecursive(Control namingContainer) +173
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +491


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