asp.net - c#.net Error: There is already an open DataReader associated with this Command which must be closed first -
help, new asp.net c#. tried codes once before didn't seems have error. can't seems figure make changes to. sever error : there open datareader associated command must closed first. codes: string strconnectionstring = configurationmanager.connectionstrings["fypdb"].connectionstring; sqlconnection myconnect = new sqlconnection(strconnectionstring); string strcommandtext = "select promoid fypdb.dbo.promotions membershiptype '%' + @membership + '%' , defaults '%' + @defaults + '%'"; try { string ddlmembership = ((dropdownlist)dvinsertpromotion.findcontrol("ddladdmembershiplist")).selecteditem.tostring(); string ddldefault = ((radiobuttonlist)dvinsertpromotion.findcontrol("radiobuttonlist2")).text.tostring(); dataset da = dal.retrievemembership(ddlmembership, ddldefault); sitegridview.datasource = da; sitegridview.databind(); sqlcommand cmd = new sqlcommand(strcommandtext...