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 169:            closeconnect();
Line 170:        }
Line 171:        return ds.Tables[0];
Line 172:    }
Line 173:    public DataTable GetDataTableSPWithTwoDateField(string strSPName, string FieldName, DateTime FieldValue, string SecFieldName, DateTime SecFieldValue)

Source File: c:\inetpub\wwwroot\SanskritAPP\App_Code\general.cs    Line: 171

Stack Trace:


[IndexOutOfRangeException: Cannot find table 0.]
   System.Data.DataTableCollection.get_Item(Int32 index) +112
   general.GetDataTableSPWithTwoIntField(String strSPName, String FieldName, Int32 FieldValue, String SecFieldName, Int32 SecFieldValue) in c:\inetpub\wwwroot\SanskritAPP\App_Code\general.cs:171
   hyper_linking_policy.FillHyperLinkingPolicy() in c:\inetpub\wwwroot\SanskritAPP\hyper-linking-policy.aspx.cs:40
   hyper_linking_policy.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\SanskritAPP\hyper-linking-policy.aspx.cs:29
   System.Web.UI.Control.OnLoad(EventArgs e) +109
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4498


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