All, I have a legacy database that I''m dealing with and a stored procedure that I need to call. I found this and it''s great for calling a SP that returns only one result set - http://made-of-stone.blogspot.com/2006/01/sql-server-stored-procedures-and-rails.html However, this SP returns several result sets (4) and I need data from the 2nd and 3rd result sets. Does anyone know how I would need to enhance the referenced code above to handle multiple result sets returned from the SP? Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Wes Gamble wrote:> Does anyone know how I would need to enhance the referenced code above > to handle multiple result sets returned from the SP? >Hi I wrote the SP code you linked to. I have been meaning to rewrite it using ADO directly - the Win32OLE stuff built into Ruby lets you create COM objects (such as an ADOCommand) and call it directly. In other words forget the "construct a big string" approach and bypass ActiveRecord''s connection entirely. Unfortunately, I''ve never had time to do it and I''m not really working with Sql Server at the moment. But that would be the way to go. Baz. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---