dbcanquery() with pdo_dblib
Adam Baratz <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CADxrgCMF4ZEw=a_-ad_DcQn96HhB_j5SfrWnW4Kn29hb_eNV_g@mail.gmail.com> |
Hi,
I'm looking at fixing this bug with the PHP pdo_dblib extension:
https://bugs.php.net/bug.php?id=67130
I have it built to use FreeTDS to communicate with MSSQL.
My understanding from the docs is that dbcanquery() does what's needed
here. Basically, it should be called before using dbresults() to get the
next rowset[1]. However, that doesn't seem to resolve the issue. The call
succeeds, but the call to dbresults() will then fail. What I've found works
is fetching the rows manually:
RETCODE ret = SUCCESS;
while (ret == SUCCESS) {
ret = dbnextrow(H->link);
}
I don't want to do anything with these rows, so I'd rather not do this. Am
I missing something basic about how dbcanquery() is supposed to be used?
Thanks,
Adam
---
[1]
https://github.com/php/php-src/blob/aed42496534fe54c5c0ce64fe0ca5c9d801d6161/ext/pdo_dblib/dblib_stmt.c#L144