Server Error in '/' 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 41:             {
Line 42:                 string id = Request.QueryString["id"];
Line 43:                 dr1 = NSCCommon.RunSqlQuery(ConfigurationManager.ConnectionStrings["YellowPageWebConnectionString"].ConnectionString, "select * from dbclients where id = " + id).Tables[0].Rows[0];
Line 44:             }
Line 45:             return dr1;

Source File: g:\pleskvhosts\melliyellowpages.com\httpdocs\Melli5050100\Profile.aspx.cs    Line: 43

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +1559118
   System.Data.RBTree`1.get_Item(Int32 index) +19
   System.Data.DataRowCollection.get_Item(Int32 index) +11
   _Profile.get_dr() in g:\pleskvhosts\melliyellowpages.com\httpdocs\Melli5050100\Profile.aspx.cs:43
   _Profile.NameE() in g:\pleskvhosts\melliyellowpages.com\httpdocs\Melli5050100\Profile.aspx.cs:51
   ASP.profile_aspx.__DataBind__control2(Object sender, EventArgs e) in g:\pleskvhosts\melliyellowpages.com\httpdocs\Melli5050100\Profile.aspx:12
   System.Web.UI.Control.OnDataBinding(EventArgs e) +99
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   _Profile.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\melliyellowpages.com\httpdocs\Melli5050100\Profile.aspx.cs:25
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062