Up Prev Next
From: sy50027 at milton dot sbi dot com (Simon Yaminian)
Subject: Re: Accessing @@rowcount global variable
Date: Jul 21 1998 3:28PM
> From owner-SYBPERL-L@listproc.net Tue Jul 21 10:26:27 1998
> From: Michael Peppler
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Tue, 21 Jul 1998 07:22:05 -0700 (PDT)
> To: SybPerl Discussion List
> Cc: email@example.com
> Subject: Accessing @@rowcount global variable
> X-Listprocessor-Version: 8.2.07 -- ListProc(tm) by CREN
> Simon Yaminian writes:
> > Hello,
> > The number of rows affected by a query is reflected in the @@rowcount
> > global variable. Is this variable accessible through Sybperl and if it is
> > how?
> In DBlib is DBCOUNT().
> In CTlib it's
> $rows = $dbh->ct_res_info(CS_ROW_COUNT);
> Michael Peppler -||- Data Migrations Inc.
> firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler
> Int. Sybase User Group -||- http://www.isug.com
I tried using the DBlib version, DBCOUNT() right after the
call and it returned -1. The dbsqlexec call was issued after building
the query as a batch of commands using multiple dbcmd calls. Is this a
permissible scenario for using DBCOUNT()?