Server Error in '/' Application.

Index 0 is either negative or above rows count.

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: Index 0 is either negative or above rows count.

Source Error:


Line 46:             DataView dv_project = DBAccess.GetListView(sql);
Line 47: 
Line 48:             project_name = dv_project[0]["title"].ToString();
Line 49: 
Line 50:             rpt_project2.DataSource = dv_project;

Source File: c:\inetpub\wwwroot\altis\projects\details.aspx.cs    Line: 48

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +1901414
   System.Data.DataView.get_Item(Int32 recordIndex) +14
   projects_details.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\altis\projects\details.aspx.cs:48
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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