Re: dbcanquery() with pdo_dblib
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAHt6W4c=ezxWoqpM79R5B0hLWGcNtEZbB6YRNAm=61N+7_TOLA@mail.gmail.com> |
2016-06-17 16:22 GMT+01:00 Adam Baratz <[email protected]>: > Thanks, see attached. I [redacted] the auth transmission. > I think you found a bug. state is not set correctly after discarding the results :( Not really hard to fix but I'd like a test for it. Frediano > On Fri, Jun 17, 2016 at 4:16 AM, Thompson, William <[email protected] >> wrote: > >> Hi Adam, >> >> I don't think you've misunderstood what dbcanquery is supposed to do. The >> Sybase documentation says that it is equivalent to calling dbnextrow until >> it reurns NO_MORE_ROWS, which is pretty much what you've replicated. >> So it looks like our implementation of dbcanquery() isn't exactly the same >> as doing that... >> >> It's difficult to see what might be happening without a debug log >> Can you run your test of dbcanquery() with TDSDUMP logging set? And then >> post with the log attached? >> See http://www.freetds.org/userguide/logging.htm >> >> Cheers, >> >> Bill >> >> >> -----Original Message----- >> From: FreeTDS [mailto:[email protected]] On Behalf Of >> Adam Baratz >> Sent: 16 June 2016 17:19 >> To: [email protected] >> Subject: [freetds] dbcanquery() with pdo_dblib >> >> 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 >> _______________________________________________ >> FreeTDS mailing list >> [email protected] >> http://lists.ibiblio.org/mailman/listinfo/freetds >> >> ---------------------------------------------------------------------- >> This message, and any attachments, is for the intended recipient(s) only, >> may contain information that is privileged, confidential and/or proprietary >> and subject to important terms and conditions available at >> http://www.bankofamerica.com/emaildisclaimer. If you are not the >> intended recipient, please delete this message. >> _______________________________________________ >> FreeTDS mailing list >> [email protected] >> http://lists.ibiblio.org/mailman/listinfo/freetds >> > > _______________________________________________ > FreeTDS mailing list > [email protected] > http://lists.ibiblio.org/mailman/listinfo/freetds >