Skip to Content.
Sympa Menu

freetds - Re: return value from stored procedure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Darryl Friesen" <Darryl.Friesen AT usask.ca>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: return value from stored procedure
  • Date: Thu, 14 Jun 2001 07:21:44 -0600



> This is my stored procedure with a 10001 return code.

[snip]


> So, How can i get it from Perl ?
> ---------------------------------------
> use DBI;
> my $dbh = DBI->connect("dbi:Sybase:server=server", 'usr', 'pwd',
> {PrintError => 0});
>
> $sth = $dbh->prepare("EXEC foo");

Maybe you've left it out of your example, or maybe stored procedures work
differently (I don't think so), but you're missing the execute statement
after the prepare.

$sth->execute();

Having said that, I've never used stored procedures from Perl, so I can't
say whether or not that's all you need to do, or even if they work at all.


- Darryl

----------------------------------------------------------------------
Darryl Friesen, B.Sc., Programmer/Analyst Darryl.Friesen AT usask.ca
Education & Research Technology Services, http://gollum.usask.ca/
Department of Computing Services,
University of Saskatchewan
----------------------------------------------------------------------
"Go not to the Elves for counsel, for they will say both no and yes"






Archive powered by MHonArc 2.6.24.

Top of Page