KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can I implement a SqlDataReader inside another SqlDataReader ? My problem is I have a SqlDataReader . I am issuing while (reader.read()) and inside the while loop I have to create another SqlDataReader to read from the database. But I'm getting exceptions about connection being already open. So what's the best way to solve my problem? Edit: I am using clr to create my stored procedures. I tried to put MultipleActiveResultSets=true; within the connection string of both the clr and the project, and an exception occurred when I tested my stored procedure on SQL Server: System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.
Tags (comma-separated)
Save Edits
Cancel