Skip to Content.
Sympa Menu

freetds - [freetds] return status for ctlib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] return status for ctlib
  • Date: Thu, 2 Jan 2003 15:58:38 -0500

I think I've corrected ct-lib's return status processing. This should help
DBD::Sybase deal with return codes from stored procedures.

Now, after calling a stored procedure with ct_send:

[this part was working and is unchanged]
ct_results() returns CS_ROW_RESULT
ct_res_info() counts the columns
ct_describe() sets each column's CS_DATAFMT.status to zero
ct_fetch() supplies the data

...then...

[this part was broken and now works]
ct_results() again returns CS_ROW_RESULT
ct_res_info() counts the columns (for a return code, 1)
ct_describe() sets the column's CS_DATAFMT.status to CS_RETURN
ct_fetch() supplies the return status code as one row of integer data

I used a simplified form of Bill's compute row processing to manufacture the
return status row in libtds. I didn't make any effort to ignore spurious
return status tokens, but whether or not anyone retrieves the status row,
it's freed when the next result set (or return status) arrives. Nothing
gets in the way and no harm is done.

The new code is exercised with src/ctlib/unittests/t0002.c.

--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