|
|
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()
Thanks
Meir Stern
Dept: User Support Engineering
Tel: 71727
Email: meir.stern@ny.email.gs.com
-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
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
try
> 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
better.
Michael
--
Michael Peppler / mpeppler@peppler.org / http://www.mbay.net/~mpeppler
mpeppler@zetatools.com / ZetaTools, Inc / http://www.zetatools.com
ZetaTools: Call perl functions as Sybase stored procedures!
|