Server Error in '/scripts/gccweb' Application.

Conversion from type 'DBNull' to type 'String' is not valid.

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.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.

Source Error:


Line 130:    Public ReadOnly Property ReadingPlanOT() As String
Line 131:      Get
Line 132:        Return _DataReader.Item("OldSection")
Line 133:      End Get
Line 134:    End Property

Source File: D:\WEBS\markupfactory.com\scripts\gccweb\App_Code\Daylights.vb    Line: 132

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +715783
   GCA.Daylights.ArtcileReader.get_ReadingPlanOT() in D:\WEBS\markupfactory.com\scripts\gccweb\App_Code\Daylights.vb:132
   daylights_Article.Render(HtmlTextWriter writer) in D:\WEBS\markupfactory.com\scripts\gccweb\journal\Article.ascx.vb:29
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240


Version Information: Microsoft .NET Framework Version:2.0.50727.9054; ASP.NET Version:2.0.50727.9051