Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
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 Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: