PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: RE: Rows Affected Information
Date: Dec 2 1998 9:51PM

Jason Risley writes:
 > I do have one additional question:
 > Do I need to use another method of counting rows via a SELECT statement?
 > 
 > My Objective here is if the SELECT was CS_SUCCEED and $row_count eq 0 then I
 > wish to print 'No Records Found'.

You can only get a valid value for number of rows affected on a select 
after all the rows have been processed. This is a fairly normal
limitation  of RDBMS engines in general.

Please read the documentation on ct_res_info() in the Sybase
OpenClient Client Library manuals for further details.

Michael

 > > -----Original Message-----
 > > From: Michael Peppler [mailto:mpeppler@mbay.net]
 > > Sent: Wednesday, December 02, 1998 1:11 PM
 > > To: jrisley@fedex.com
 > > Subject: Rows Affected Information
 > >
 > >
 > > Jason Risley writes:
 > >  > Hello,
 > >  >
 > >  > Does anyone know how to retrieve the ROWS_AFFECTED Information
 > > for a DELETE
 > >  > or UPDATE sql statement?
 > >
 > > $row_count = $dbh->ct_res_info(CS_ROW_COUNT);
 > >
 > > Michael
 > > --
 > > Michael Peppler         -||-  Data Migrations Inc.
 > > mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
 > > Int. Sybase User Group  -||-  http://www.isug.com
 > > Sybase on Linux mailing list: ase-linux-list@isug.com
 > >
 > 
 > 

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com