Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 278:
Line 279:        sqlComm.CommandText = "SELECT count(musicscorefileID) as musicscorefilesCount FROM musicscorefiles WHERE musicscoreid=" & MusicScoreID
Line 280:        musiccountpages = sqlComm.ExecuteScalar.ToString
Line 281:
Line 282:        Return musiccountpages

Source File: E:\AADATA\WEB\NT\App_Code\util.vb    Line: 280

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   util.findMusicScoreFilesCount(String MusicScoreID) in E:\AADATA\WEB\NT\App_Code\util.vb:280
   ASP.playmaterial_aspx.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in E:\AADATA\WEB\NT\playMaterial.aspx:801
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +114
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +252
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +86
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +239
   System.Web.UI.Page.Render(HtmlTextWriter writer) +37
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975