Server Error in '/' Application.

There is already an open DataReader associated with this Command which must be closed first.

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: There is already an open DataReader associated with this Command which must be closed first.

Source Error:


Line 439:        comm.Connection = DBcode.myConnection
Line 440:        comm.CommandText = "SELECT playid FROM playworks WHERE workid=" & workid
Line 441:        Dim rs As Data.SqlClient.SqlDataReader = comm.ExecuteReader
Line 442:        If rs.HasRows Then
Line 443:            Do While rs.Read()

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

Stack Trace:


[InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.]
   System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command) +6317537
   System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) +213
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +146
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +211
   System.Data.SqlClient.SqlCommand.ExecuteReader() +117
   util.FindPlayIDForWorkID(String workid) in E:\AADATA\WEB\NT\App_Code\util.vb:441
   workDetails.Page_Load(Object sender, EventArgs e) in E:\AADATA\WEB\NT\workDetails.aspx.vb:150
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


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