So I'm connecting to SQL Server 2005 from my Rails app via the activerecord-sqlserver-adapter.
I'm able to execute stored procs by doing
Mymodel.execute_procedure("thisProcedure", param1, param2)
But I have a stored proc that has a SQL INOUT variable that I'm having trouble with. I execute it, and I'm not seeing that variable returned.
So now I'm trying to just execute some raw sql, such as
declare @thisVar int
EXEC thatProcedure 1, 1, @thisVar = @thisVar output
print @thisVar
When I do
sql = "declare @thisVar int
EXEC thatProcedure 1, 1, @thisVar = @thisVar output
print @thisVar"
foo = Mymodel.connection.execute(sql)
I'm not getting any errors and everything looks successful. I get back foo that has a class of DBI::StatementHandle. How do I actually see the response from the SQL?
Thanks in advance!