Skip to Content.
Sympa Menu

freetds - RE: [freetds] request to implement dbmorecmds for dblib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] request to implement dbmorecmds for dblib
  • Date: Thu, 1 May 2003 11:22:13 -0400

> From: Bill Stewart [mailto:bstewart AT verio.net]
> Sent: April 30, 2003 3:51 PM
>
> Let me know what else I might do to get dbmorecmds moving forward.

Bill,

Your test is no good, yaar. You have (abbreviated):

dbsqlexec(dbproc);
while (dbmorecmds(dbproc)) {
more_count++;
dbresults(dbproc);
}

but both vendors say dbmorecmds() "should be called after dbnextrow returns
NO_MORE_ROWS. If you know that the current command does not return any rows,
you can call dbmorecmds after dbresults returns SUCCEED."

I wrote our dbmorecmd() conformant to that description. If the above code
runs when linked with either vendor's library, let me know and maybe we can
establish empirically what they're doing. Else you need a loop more like:

if( dbresults(dbproc) == SUCCEED ) {
do {
while( dbnextrow(dbproc) != NO_MORE_ROWS.);
} while( dbmorecmds(dbproc) == SUCCEED )
}

Recommend you grab a more recent snapshot and modify the test. It will be
in tomorrow's snapshot as src/dblib/unittests/dbmorecmds.c.

BTW, the query "select count(*) from #dblib0024 order by i" won't run on a
Microsoft server because 'i' isn't in the select list. Apart from that,
it's a bit odd, ordering one row. Were you trying to induce some particular
behavior?

Using current CVS, 3 other dblib unit test also fail, complaining about
pending results. So there may be protocol or state management issues
lurking, too. I don't know yet.

Regards,

--jkl


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.





Archive powered by MHonArc 2.6.24.

Top of Page