# Oracle Stored Procedures - Out Vars

**URL:** <https://www.ruby-forum.com/t/oracle-stored-procedures-out-vars/55967>\
**Category:** Ruby\
**Created:** [March 26, 2006, 11:01am UTC](https://www.ruby-forum.com/t/oracle-stored-procedures-out-vars/55967 "2006-03-26T11:01:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vance\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/df705f/32.png) [@Vance\_H](https://www.ruby-forum.com/u/Vance_H)\
**Post date:** [March 26, 2006, 11:01am UTC](https://www.ruby-forum.com/t/oracle-stored-procedures-out-vars/55967/1 "2006-03-26T11:01:45Z")

</div>

Can anyone help me with the syntax for retriving an ‘out’  
variable from an Oracle Stored Procedure?

I’m able to succesfully call several stored procedures,  
and can pass values in - both by putting the argument  
into the SQL statment, or by using a ? in the stmt  
then passing the value when I execute it, but have  
not been able to retrieve the ‘out’ value.

I’ve tried sth.fetch()[0] ,and sth.get()

Any help will be appreciated.

Thanks,  
Vance

---

<div class="post-metadata">

**Author:** ![Vance\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/df705f/32.png) [@Vance\_H](https://www.ruby-forum.com/u/Vance_H)\
**Post date:** [March 28, 2006, 1:52am UTC](https://www.ruby-forum.com/t/oracle-stored-procedures-out-vars/55967/2 "2006-03-28T01:52:56Z")

</div>

Hi,

Vance H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Can anyone help me with the syntax for retriving an ‘out’  
> variable from an Oracle Stored Procedure?
> 
> I’m able to succesfully call several stored procedures,  
> and can pass values in - both by putting the argument  
> into the SQL statment, or by using a ? in the stmt  
> then passing the value when I execute it, but have  
> not been able to retrieve the ‘out’ value.
> 
> I’ve tried sth.fetch()[0] ,and sth.get()

ruby-dbi doesn’t support out parameters.  
Use a driver specific function:  
sth.func(:bind\_value, 0)
