Skip to Content.
Sympa Menu

freetds - RE: [freetds] FreeTDS 0.61 broken with Sybase

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Alex Kiesel <alex.kiesel AT document-root.de>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] FreeTDS 0.61 broken with Sybase
  • Date: Fri, 27 Jun 2003 09:04:31 -0000

On Thu, 2003-06-26 at 23:45, Lowden, James K wrote:

> Let me see if I understand. I'm not a ct-lib programmer; I just read the
> docs and follow along.
>
> 1. The command is executed and the result set empty. The query might
> have been as simple as "select 1 where 0=1".

Unluckily it's not as easy :) This query returns an empty resultset.
* With FreeTDS 0.61 PHP returns a boolean instead of a sybase result
resource => unusable
* With yesterdays FreeTDS-current, a valid result resource is returned
just as it should be :) It seems, this error has been fixed since
then.

The problem however still exists when using stored procedures.

> 2. ct_results() is called, it gives restype 4047 (CS_CMD_SUCCEED). It
> should return CS_ROW_RESULT.
> 2a. ct_res_info() should be called and should yield the number of
> columns.
> 2b. ct_fetch should be called, and should return no rows.
> 3. Instead, 2a & 2b do *not* happen.

2a & 2b happen together, prerequisite, however, is that one receives one
of CS_COMPUTE_RESULT, CS_CURSOR_RESULT, CS_PARAM_RESULT, CS_ROW_RESULT
or CS_STATUS_RESULT.

Btw: ct_res_info called with CS_ROW_COUNT does never give the number of
rows, it's always -1 or 0.

> 4. The next call to ct_results() returns a surprise to PHP, and bad
> things start to happen.

Yes, this is caused by the fact that PHP only expects one resultset.

Greets,
Alex





Archive powered by MHonArc 2.6.24.

Top of Page