@carl & @robert...thanks for the replies. ActiveRecord definitely _not_ involved here, and can't be.
This app gets distributed to folks with a wide range of computing experience. 99% of them have never even heard of Ruby. At best we'll have an MS "certified" network admin. Often it's just an average user saddled with the responsibility of making this work and who needs step-by-step instructions with screen captures to install Ruby on Windows, then our app. Nothing else. Must be as simple as possible. I do not want to add any form of gem management at all. So, bare metal it has to be, and I accept all the extra code that implies in order to deal with error management (that, in effect is the question -- finding someone able to lend assistance on what all that needs to be specifically with a win32ole to SQL Server connection). -- gw On Oct 3, 2011, at 11:41 AM, Robert Kaufman wrote: > I've done this a couple times in the past, and I've found that by far the > best way to connect ActiveRecord or Sequel ORMs to SQLServer is via jRuby. > The JDBC drivers are maintained by Microsoft, and are actually really good > quality. This allows you to extract and interact with data in a fairly high > level way (Object Models) and you get good quality reconnection / error > handling / SQL injection protection, etc. > > I know that's a completely different solution direction than the OLE work you > are already doing, but it is worth keeping in mind that the OLE libraries > only allow local connection and are always fairly bare metal in their > implementation. > > > On Oct 3, 2011, at 1:31 PM, <[email protected]> wrote: > >> I have lots of experience in this area. Generally I just use stand alone >> activerecord connection and a few other goodies that allow multiply PKs and >> calls to stored procs. >> >> You can go down lower to the metal if you want but I like being able to >> define active record objects and just call their methods in my Ruby (not >> rails) app. >> >> ---- 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. -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
