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: "Matthew O dot Persico" <persicom at acedsl dot com>
Subject: Re: One-shot stored proc execution
Date: Aug 6 2002 11:48PM

On 06 Aug 2002 06:51:05 -0700, Michael Peppler spaketh:
>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).

Hm. With only one result set, that simplifes to
    results[0]->[0] == 0

--
Matthew O. Persico