[freetds] request to implement dbmorecmds for dblib
Bill Stewart
bstewart at verio.net
Thu May 1 14:28:57 EDT 2003
James,
Lowden, James K wrote:
>>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'll work on this. Thanks for the explaination. Hope this didn't suck up
too much time. I think we use dbmorecmds here in our scripts in a
strange and maybe not all together proper manner. I should have been
less focused on that and more on the proper documents.
>
> 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.
Will do.
>
> 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?
Oops. I missed the removal of this, I copied from one of the other test
programs, there should be no order by clause here. Sorry for that.
>
> 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.
Ok. Well I obviously need to get the basic test working properly first
regardless of this issue.
Thanks again,
Bill
>
> 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.
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
>
More information about the FreeTDS
mailing list