Skip to Content.
Sympa Menu

freetds - Re: [freetds] dbcanquery() with pdo_dblib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, William" <bill.d.thompson AT baml.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dbcanquery() with pdo_dblib
  • Date: Fri, 17 Jun 2016 08:16:47 +0000

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:freetds-bounces AT lists.ibiblio.org] On Behalf Of Adam
Baratz
Sent: 16 June 2016 17:19
To: freetds AT lists.ibiblio.org
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
FreeTDS AT lists.ibiblio.org
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.




Archive powered by MHonArc 2.6.24.

Top of Page