Skip to Content.
Sympa Menu

freetds - Re: [freetds] return status for ctlib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] return status for ctlib
  • Date: 02 Jan 2003 22:22:16 +0100

Il gio, 2003-01-02 alle 21:58, Lowden, James K ha scritto:
> 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.
>

Yes but this broke ODBC code.
ODBC do not expect status returned as ROW, only binding result...

I don't know dblib... dblib have dbhasretstatus but I don't know how to read
value...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page