Skip to Content.
Sympa Menu

freetds - RE: [freetds] FreeTDS 0.64.dev.2005041 dblib rpc failure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] FreeTDS 0.64.dev.2005041 dblib rpc failure
  • Date: Wed, 13 Apr 2005 14:19:01 +0100

liam,

would need a TDSDUMP to see why you're getting the results pending
message,

but I can see an error in your code.

from the sybase manual:

"When executing a stored procedure, the server returns the status number
immediately after returning all other results. Therefore, the
application can call dbhasretstat only after processing the stored
procedure's results by calling dbresults, as well as dbnextrow if
appropriate. (Note that a stored procedure can generate several sets of
results-one for each select it contains. Before the application can call
dbhasretstat or dbretstatus, it must call dbresults and dbnextrow as
many times as necessary to process all the results.)"

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of liam AT inodes.org
Sent: 13 April 2005 12:56
To: freetds AT lists.ibiblio.org
Subject: [freetds] FreeTDS 0.64.dev.2005041 dblib rpc failure


Hi,

The following test case works fine with 0.63-dev.20040824 but fails
with 0.64.dev.20050411.

Is the test case valid? It seems so to me. Please let me know if
I'm doing anything wrong.

I get the following dblib error message:

Attempt to initiate a new SQL Server operation with results
pending

This happens on the first iteration of the 'for' loop in the second
iteration of the dbresults() 'while' loop. It has already fetched
the result at this stage and expects to get NO_MORE_RESULTS on
the second time around the loop.

The stored procedure simply does a SELECT MAX(field) FROM TABLE.
It also sets a return code. It takes no parameters.

Thanks.
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page