From: Damjan Rems Date: 2008-03-25T15:43:24+09:00 Subject: Re: MSSQL 2005 Stored Procedure? Alexander Tretjakov wrote: > Damjan Rems > thank you > Sorry for my Bad English. > > Can you help me with this problem? I want programming Ruby. > Can I get out parameter @i1 from this code? > > create procedure us_test @i int,@i1 int out > AS > select @i as i > select @i1 as i1 > select @i as i,@i1 as i1 > select @i1=@i1+1 > GO > > declare @i int,@i1 int > select @i=1,@i1=2 > exec us_test @i,@i1 out > select @i1 > go This example is using ActiveRecord to call stored procedure. As you can see last result of SELECT is returned as ar record. class MyLoginTable < ActiveRecord::Base establish_connection( :adapter => "mssqlclient", :host => "MYHOST", :username => "myusr", :password => "mypwd", :database => "mydb" ) set_table_name "mytable" end sql = < 'login' else ... by TheR -- Posted via http://www.ruby-forum.com/.