Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Stern, Meir" <meir dot stern at gs dot com>
Subject: RE: ROW_COUNT Question
Date: Sep 19 2002 6:40PM

Thank you for the response.

I would be very ineterested in finding out if you release this new version
of ct_sql()


Meir Stern
Dept: User Support Engineering
Tel: 71727

-----Original Message-----
From: Michael Peppler []
Sent: Thursday, September 19, 2002 5:22 AM
To: SybPerl Discussion List
Subject: Re: ROW_COUNT Question

On Wed, 2002-09-18 at 12:37, Stern, Meir wrote:
> I am trying to get the ROW_COUNT based on a ct_sql call which I exec a
> stored procedure that returns rows of data. for some reason when ever I
> to print out the ROW_COUNT it comes up with a -1 instead of the amount of
> rows. My undarstanding is that ROW_COUNT gets set automatically with a
> ct_sql call.

I think you are hitting a bug, or maybe an unintended behavior.

ct_sql() does set the row count, but it only sets it at the end of the
command (I think), rather than when a query is done within the batch.
When you execute a stored procedure there are more than one result set,
and this means that the ROW_COUNT value will be set to the last result
set, which is normally the stored procedure's status result.

I'll have to look at the code to see if there is a way to make that work

Michael Peppler / / / ZetaTools, Inc /
ZetaTools: Call perl functions as Sybase stored procedures!