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: Thomas Gagné <tgagne AT wideopenwest.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS 0.61 broken with Sybase
  • Date: Fri, 27 Jun 2003 12:06:47 -0400

If you're at all familiar with how PHP handles Sybase, do you have any suggestions on how to get PHP to handle sybase DATE and NUMERIC formats? Does PHP have date and decimal types?

Alex Kiesel wrote:

On Wed, 2003-06-25 at 23:02, Lowden, James K wrote:

From: Alex Kiesel [mailto:alex.kiesel AT document-root.de]
Sent: June 25, 2003 3:37 PM

I am currently experiencing some trouble with FreeTDS. Since between the
two latest releases (0.60 vs. 0.61.*) the handling of stored procedures seems to be borked.

Alex,
Is it feasible for you to use a recent snapshot? We noticed some problems
with stored procedures that don't return a result set; those have been fixed
since 0.61.1.

Again, after testing with PHP5 (out of todays CVS), and todays
freetds-current (0.61.dev.20030626) and looking a little bit into PHP
Sybase handling code, I see the following when selecting an empty
resultset:

* ct_results is called, it gives restype 4047 (TDS_CMD_SUCCEED)
fetching of any data except for
ct_res_info(sybase_ptr->cmd, CS_ROW_COUNT, &row_count, ...)
therefore does not take place. A CS_ROW_RESULT would be necessary even
if it is an empty resultset.

* because PHP5 doesn't currently (and so in the past) support multiple
resultsets, it breaks the whole loop and enters the next one which
just expects an CS_END_DATA. In case of any other type, ct_cancel()
will be called:
ct_cancel(NULL, sybase_ptr->cmd, CS_CANCEL_CURRENT)

* this happens three times, each time the restype of the result was 4040
(CS_ROW_RESULT).

Something has changed in the handling of an empty resultset, so in case
of an empty resultset a CS_CMD_SUCCESS, and when receiving 1+ rows
CS_ROW_RESULT is returned.



I will try to reproduce your sqsh script with our current CVS version.

Btw: this was a PHP script...

Greets,
Alex


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




--
.tom







Archive powered by MHonArc 2.6.24.

Top of Page