Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Filipe Lourenço
58
Views
3
Comments
There is already an open DataReader associated with this Command which must be closed
Question
What to do when receiving this kind of error :
There is already an open DataReader associated with this Command which must be closed first
André Siébra
How exactly are you getting this error?
Filipe Lourenço
I dont know why.It refers one query but if i delete that query i get the error on another query that exists on preparation
Cláudia Frutuoso
Staff
Hello, Filipe,
Are you still experiencing this issue?
We have encountered a pattern that might cause this error: if you have a query with Max. Records set to 1 and if you use the result of this query to iterate a For Each that runs over other queries, you might hit this error. The query that is shown in the error will be the one inside the For Each and not the one with the Max. Records set to 1.
You can workaround the problem by instead of using a For Each, access the results of the query directly (it only has one row anyway).
Let me know if this solves your issue.
DataReaderIssue.PNG
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...