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 peppler dot org>
Subject: Re: One-shot stored proc execution
Date: Aug 6 2002 1:51PM

On Mon, 2002-08-05 at 12:39, Matthew.Persico@Lazard.com wrote:
> Before I go and try this, has anyone else? That is, skipping the
> prepare/execute/fetch/syb_last_results loop when you have a stored proc that you
> know has no result sets, no output params and returns one value?
> 
> my @results = $logins_dbh->selectall_array("sp_changegroup login,
> PORTIA_login");
> if(@results
>        &&
>        $results[$#results]->[0] == 0) {
>         print "Proc was ok\n";
>     } else {
>         print "Proc bombed\n";
>    }

I haven't tried this, but that *should* work as there is only one result
set (the status result).

Also look at the syb_do_proc_status attribute.

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!