On Thursday, March 8, 2012 1:21:35 PM UTC-8, Hillary wrote:
>
> So i assume that i use the .fetch method: 
>
> $DB.fetch("EXEC Stored_Procedure @param1 = X, -- varchar(50)
>     @param2 = x, -- datetime
>     @param3 = x', -- datetime
>     @param4 = x -- bit
> ") do |row|
>   puts row[:Column]
> end
>
>
> So i have a couple questions, how do i get any information out of what's 
> returned? I want to be able to compare the text value of the report with 
> it's corresponding column in the stored procedure. 
>
> I guess my other question is do you know any sequel like gems that support 
> stored procedures? I'm testing the data of some reports so I'd rather not 
> try to do each query in the sproc individually. 
>

Like I mentioned, there is no support in Sequel for in/out variables.  If 
you want to get information out of the stored procedure, the stored 
procedure has to return a result set, which fetch should yield as hashes.

I'm not aware of other gems that support stored procedures, but I haven't 
looked.

For what you want to do, I'm not sure if you need to call the stored 
procedure directly.  Is there a reason you can't just put known data in the 
test database, and test that the report output matches what you expect?

Jeremy

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/ELkzGHZ_zmQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to