Greg,

I work on a large Rails project connecting to SQL Server, and we have used
tiny_tds with success:
https://github.com/rails-sqlserver/tiny_tds

Before this we used to have freetds setup with unixodbc, which worked fine,
but required a bunch of configuration and system dependencies. tiny_tds is
much more lightweight and requires only one gem install, allowing you to put
direct access credentials to any SQL Server directly in your
config/database.yml (assuming you're using it with the
activerecord-sqlserver-adapter).

Note that in my situation we're accessing direct tables, not going through
any stored procedure layer, which probably incurs its own host of
challenges. Nevertheless, you should be able to do whatever you want with
ActiveRecord::Base.connection once set up.

Ben


On Fri, Sep 30, 2011 at 6:49 PM, Greg Willits <[email protected]> wrote:

> I'm looking for someone experienced with win32ole and/or any other form of
> connectivity of Ruby to SQLServer who could provide some guidance for
> improvements to my code, and give me some in-depth tutoring on all things
> Ruby<-->OLE<-->SQL Server. (Or is there something better than OLE?).
>
> Currently I'm using win32ole. I'm not an MS guy, nor a SQL Server guy. I've
> collected code samples, and for the most part what I have works, but there's
> the odd case where connectivity is failing, and I'm at my wits end trying to
> figure out the myriad of possible problems.
>
> I need my code to have more informative error trapping, better error
> recovery, etc. To do that, I need to understand OLE/SQL Server better, but
> I'd really prefer to do that with an experienced trail guide. Code samples
> from blogs only go so far, and I need some practical improvements in place
> ASAP while I catch up on general study.
>
> Direct replies/recommendations can be sent to
> gregwillits-at-terben-dot-com.
>
> I'm in Orange County, I'll do the driving to wherever.
>
> Background:
>
> I manage a data aggregation system. I have a small companion app I
> distribute to data contribution clients. The app runs queries to pull fairly
> large record sets from SQL Server, compress the results, and FTPS it to my
> server where the data is run through the data aggregation system.
>
> This data collection app generally works quite well but we've run into
> problems with very large data sets, with dropped connections, and other
> occasional problems.
>
> I don't know SQL Server well at all. I don't know OLE well at all. I've
> used code gleaned from blog examples, and some research into MS docs.
>
> Any leads are greatly appreciated.
>
> -- greg willits
>
>
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby
>

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to