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 35:         item_id = item_name != null && item_name.IndexOf("_") != -1 ? item_name.Substring(item_name.LastIndexOf("_") + 1, item_name.Length - (item_name.LastIndexOf("_") + 1)) : "0";
Line 36: 		// [patch per redirect vecchie url]
Line 37: 		string sItemName = myFunc.cleanForPath(myOp.get_field("SELECT contenuti_nomeBreve_" + lang + " FROM contenuti WHERE ID = " + item_id + " "));
Line 38: 		if (!sItemName.Equals("")){
Line 39: 			if (!item_name.Substring(0, item_name.LastIndexOf("_")).ToLower().Equals(sItemName.ToLower())) {

Source File: c:\inetpub\wwwroot\sintesiimmobiliare\contenuti.aspx.cs    Line: 37

Stack Trace:


[IndexOutOfRangeException: Cannot find table 0.]
   System.Data.DataTableCollection.get_Item(Int32 index) +113
   afterbit.access_db_operations.sqlOperations.get_field(String field_name, String comandoSQL) +53
   _contenuti.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\sintesiimmobiliare\contenuti.aspx.cs:37
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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