Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: PL/SQL Functions.

by busunsl (Vicar)
on May 29, 2001 at 16:25 UTC ( [id://83901]=note: print w/replies, xml ) Need Help??


in reply to PL/SQL Functions.

bind_param_inout is meant for stored procedures, not for functions.
For functions use a combination of bind_col and placeholders.

Replies are listed 'Best First'.
Re: Re: PL/SQL Functions.
by jorg (Friar) on May 29, 2001 at 18:23 UTC
    The DBD::Oracle documentation specifies that one can (not saying should) use bind_param_inout for stored functions.

    Snippet from DBD::Oracle docs (comes installed with DBD::Oracle, search for DBD/Oracle.html in your Perl source tree)
    # Example 4 # # What about the return value of a PLSQL function? # Well treat it the same as you would a call to a function # from SQL*Plus. We add a placeholder for the return value # and bind it with a call to bind_param_inout so # we can access it's value after execute. my $whoami = ""; $csr = $db->prepare(q{ BEGIN :whoami := PLSQL_EXAMPLE.FUNC_NP; END; }); $csr->bind_param_inout(":whoami", \$whoami, 20); $csr->execute; print "Your database user name is $whoami\n"; $db->disconnect;


    Jorg

    "Do or do not, there is no try" -- Yoda

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://83901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found