Server Error in '/' Application.

Invalid attempt to read when no data is present.

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.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:


Line 42:         'exec s_get_news_story_images_visible int_news_story_id, 2
Line 43: 
Line 44:         Dim int_news_source_id As Integer = datareader.Item("rel_news_source_id")
Line 45: 
Line 46:         lbl_news_story_title.Text = datareader.Item("news_story_title")

Source File: E:\Websites_ae\Freedomhealth\www.freedomhealth.co.uk\news_story_alt.aspx    Line: 44

Stack Trace:


[InvalidOperationException: Invalid attempt to read when no data is present.]
   System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +137
   System.Data.SqlClient.SqlDataReader.get_Item(String name) +24
   ASP.news_story_alt_aspx.page_setup() in E:\Websites_ae\Freedomhealth\www.freedomhealth.co.uk\news_story_alt.aspx:44
   ASP.news_story_alt_aspx.Page_Load(Object sender, EventArgs e) in E:\Websites_ae\Freedomhealth\www.freedomhealth.co.uk\eflo\mer_pagestart.aspx:7
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433