Hi Jeremy

I managed to get sequel to handle the stored proc with output parameters 
correctly. The commit I referenced in the previous commit needed only a 
small tweak to get it working properly.

It does however need some polishing. Would you mind reviewing it and 
sending me the feedback?

Thanx!
J

On Friday, 20 December 2013 10:54:57 UTC+2, Jurgens du Toit wrote:
>
> Thanx for your reply.
>
> Will something like this work?
>
> https://github.com/jrgns/sequel/commit/51761c4df1357faacc8a490c242b4e07aed2ebeb
>
> I'm fairly new to ruby and sequel, so any help will be appreciated!
>
> J
>
> On Friday, 20 December 2013 09:06:07 UTC+2, Jeremy Evans wrote:
>>
>> On Thursday, December 19, 2013 10:04:35 PM UTC-8, Jurgens du Toit wrote:
>>>
>>> On Friday, 9 March 2012 00:41:32 UTC+2, Jeremy Evans wrote:
>>>>
>>>> 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
>>>>
>>>
>>> I know this is an old post, but I was wondering if there is any progress 
>>> on this? We're working on a legacy system that returns a lot of information 
>>> from stored procs in out variables.
>>>
>>> Are there any limitations to the code that prevented you from adding the 
>>> support? I'm working with the tinytds adapter.
>>>
>>
>> Output variables in stored procedures are still not supported directly 
>> (on any adapter).  Considering that tiny_tds still doesn't appear to 
>> support them (https://github.com/rails-sqlserver/tiny_tds/issues/24), I 
>> don't see how Sequel could for the tinytds adapter.  It looks like 
>> ruby-odbc does have support for them (
>> http://www.ch-werner.de/rubyodbc/odbc.html), in which case it's possible 
>> to Sequel to support it in the odbc adapter.  It's probably also possible 
>> in the jdbc adapter, as I think JDBC supports it.  
>>
>> I don't plan on writing input/output variable support myself, but I'll be 
>> happy to review patches that add the support.
>>
>> Thanks,
>> Jeremy
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to