Server Error in '/WebSite' 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 42:             ds = new DataSet();
Line 43:             ada.Fill(ds, "headloading");
Line 44:             loading.Text = ds.Tables["headloading"].Rows[0]["group_facilities_name_" + Session["lang"]].ToString();
Line 45:             
Line 46:             ada = new SqlDataAdapter("select * from mcs_text_facilities_list_detail where ref_text_facilities_list_id ='" + id + "'", con);

Source File: d:\WWW\Website\mcssteel\lightgal2.aspx.cs    Line: 44

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2443454
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   lightgal.Page_Load(Object sender, EventArgs e) in d:\WWW\Website\mcssteel\lightgal2.aspx.cs:44
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048


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