rmatil has asked for the wisdom of the Perl Monks concerning the following question:
I need to get the SQL text for a give db object . for. eg. sp_helptext spName which would give the underlying SQL text for the Stored proc. I have pasted the code that am using:
$dbh = DBI->connect("dbi:Sybase:host=<host>:port=<port>",user,pwd) my $rv; #holds the return value from sybase stored procedure eval { my $func = $dbh->prepare(q{ BEGIN :rv := jwb_function( parameter1_in => :parameter1 ); END; }); $func->bind_param(":parameter1", "spname"); $func->bind_param_inout(":rv", \$rv, 1000); $func->execute; print $rv;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl db programming
by mje (Curate) on Feb 04, 2009 at 16:25 UTC | |
by rmatil (Initiate) on Feb 05, 2009 at 08:46 UTC | |
by mje (Curate) on Feb 05, 2009 at 11:12 UTC |