Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
How can I get value of output parameter using DBI library
hongseok.yoon
5/22/2008 10:24:00 AM
I'm coding with DBI and MSSQL.
I've connected to the server with following line of code.
dbh = DBI.connect('DBI:ODBC:driver_name', 'user_name', 'user_pwd')
....and if it suppose that there's a stored procedure named add_user
has return value and three parameters(two are input param and the last
one is output param).
I've reeeeeeeeeeally tried to search the solution from the WEB and
just follow some code(e.g.
http://ruby-oci8.rubyforge.org/en/FAQ_plsql_out_...
).
Next several lines of code is it result...
sth_db = dbh.prepare("{ ? = call add_user(1, 'name', ?) }")
sth_db.bind_param(1, ' ' * 50)
sth_db.bind_param(2, ' ' * 50)
sth_db.execute
grp_sn = sth_db.func(:bind_value, 2)
....but, does not work!
How can I complete my job! Give me some clue~ plz!
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
How can I get value of output parameter using DBI library
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password