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: DBD::Sybase execute() problem
Date: Jul 8 1999 1:55PM

Rick Nicoletti writes:
 > I'm trying to determine if the following behaviour of execute()
 > is a bug or a "feature".
 > When I execute:
 > 
 > $sth = $dbh->prepare("exec a_proc_for_which_i_dont_have_execute_perms");
 > $sth->execute() || die "execute error: ", $sth->errstr;
 > 
 > execute() does NOT return false, although $DBI::errstr gets set to
 > "... EXECUTE permission denied on object ...".
 > 
 > In other words, executing a stored procedure which I don't
 > have execute permissions on will succeed (as far as execute()
 > is concerned) and I have no way of knowing it failed (short of
 > testing $DBI::errstr). 
 > 
 > This seems kinda strange to me.  Anyone else?
 > 
 > DBI version 1.11
 > DBD::Sybase version 1.17 or 1.19
 > 
 > I apologize in advance if this is expected behaviour, but I've scoured
 > the DBI and DBD:Sybase docs and came up empty.

Well, it's sort of expected behaviour.

In reality the execute should fail, but for some reason the Sybase
ct_execute() call does not return a failure on the first run, I
guess. I will look into this further to see if I can improve this...

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