in reply to Re: Re: SQL Stored Procedure return value
in thread SQL Stored Procedure return value

Besides the good advice of VSarkiss, do some error checking. Maybe you don't have permission to run the stored proc or maybe your not in the correct database when you login from your script. I try to always follow this template when doing DBI work:

#!/usr/bin/perl -w use strict; use DBI; my $dbh = DBI->connect( $dsn, $user, $pass, { PrintError => 0, RaiseError => 1 } ); eval { my $sql = "blah ... "; my $sth = $dbh->prepare( $sql ); $sth->execute; do { ... } while( $sth->{syb_more_results}); $sth->finish; }; if( $@ ) { print STDERR "DB error: $@\n"; } $dbh->disconnect if $dbh;

-derby