Server Error in '/' Application.

Cannot find table 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: Cannot find table 0.

Source Error:


Line 352:                cn.Close()
Line 353:        
Line 354:                imgimage.ImageUrl = "../../images/Fasterners/" & dstable.Tables(0).Rows(0)(1) & ".jpg"
Line 355:            
Line 356:            End If

Source File: D:\Inetpub\vhosts\stanline.com.au\httpdocs\other\fasteners\fasteners.ascx    Line: 354

Stack Trace:


[IndexOutOfRangeException: Cannot find table 0.]
   System.Data.DataTableCollection.get_Item(Int32 index) +113
   ASP.other_fasteners_fasteners_ascx.Page_Load(Object sender, EventArgs e) in D:\Inetpub\vhosts\stanline.com.au\httpdocs\other\fasteners\fasteners.ascx:354
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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