Bug #14175 There is already an open DataReader (but no DataReader being used)
Submitted: 20 Oct 2005 12:37 Modified: 23 Nov 2005 10:00
Reporter: Cameron Oreo Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:1.0.6.15336 OS:Windows (XP Pro)
Assigned to: Assigned Account CPU Architecture:Any

[20 Oct 2005 12:37] Cameron Oreo
Description:
I am not using any datareaders in my application.  On a page I open one Dataset using a stored procedure.  I then try to open another Dataset and get...

"There is already an open DataReader associated with this Connection which must be closed first"

As I said, there are absolutely no datareaders in my application.

How to repeat:
My code:

DataSet ds = MySQLHelper.ExecuteDataset(connString, CommandType.StoredProcedure, "UserDetails", new MySqlParameter("UserID",userID));

//do something with dataset

//call a function that returns another dataset
return MySQLHelper.ExecuteDataset(connString, CommandType.StoredProcedure, "CompanyListUsers", new MySqlParameter("CompanyID",companyID));

line above throws the error
[20 Oct 2005 13:08] Cameron Oreo
I found the problem here was in the 2nd stored procedure.  I was using syntax of:

SELECT USR_Firstname + ',' + USR_Lastname AS 'FullName'

When I changed it to:

SELECT CONCAT(USR_Firstname, ',', USR_Lastname) AS 'FullName'

then the error about the open DataReader went away.
[23 Oct 2005 10:00] Vasily Kishkin
Sorry...I was not able to reproduce it. Could you please attach full correct text of your test case ?
[24 Nov 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".