Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error "The active result for the query contains no fields" after PDOStatement->nextRowset() #591

Closed
epoxa opened this issue Nov 9, 2017 · 2 comments

Comments

@epoxa
Copy link

epoxa commented Nov 9, 2017

I need to fetch results from a dynamic query returning potentially multiple result sets.
Because of dynamic nature of the request I do not know how many result sets will be returned from server.
To handle this I used the code:
do { if ($result->columnCount()) { $data = $result->fetchAll(PDO::FETCH_NUM); } else { $data = []; } } while ($result->nextRowset());
After upgrading to the latest pdo_sqlsrv version I get the error mentioned in the issue title.
I've checked this out: #507 but I do not want to suppress all errors with PDO::ERRMODE_SILENT
Is any possibility to determine next rowset is present before calling nextRowset()? Or how can I handle the issue other way?
Thanks.

@yitam
Copy link
Contributor

yitam commented Nov 9, 2017

Hi @epoxa

This is related to #581, which we are currently investigating. We will keep you posted.

@epoxa
Copy link
Author

epoxa commented Nov 9, 2017

Ah really! Thanks a lot

@epoxa epoxa closed this as completed Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants