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 72:         string sqlBlog = "Select *,(select Name from Customers where id=Blog.UserID) as Custname, CONVERT(VARCHAR(10), MoDate, 103) AS MoifDate from Blog where BlogsAdoption='Approved' and id='" + Request.QueryString["id"].ToString() + "' order by MoDate desc";
Line 73:         DataSet dsBlog = MemoDataAccess.GetData(sqlBlog, "Blog");
Line 74:         DataRow rowBlog = dsBlog.Tables["Blog"].Rows[0];
Line 75:     %>
Line 76: 

Source File: c:\Inetpub\vhosts\oudbank.com\httpdocs\blog.aspx    Line: 74

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2441565
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   ASP.blog_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) in c:\Inetpub\vhosts\oudbank.com\httpdocs\blog.aspx:74
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.site_master.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in c:\Inetpub\vhosts\oudbank.com\httpdocs\site.master:389
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +11836097
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +50
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +250
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +250
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


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