Cheers for the reply Joe, tiny looked fairly straightforward but alas had similar issues, oddly failing on: The specified module could not be found. - C:/Ruby200/lib/ruby/gems/2.0.0/gems/tiny_tds-0.6.1-x86-mingw32/lib/tiny_tds/tiny_tds.so (LoadError) but on navigation to the specified location I found the required file there and well. I'll try again on a different VM when I have them up and running, just to see if it's environmental or some problem with my ruby install.
Will also try the active record option, see if that's any better. WIll keep this post updated on my progress..... G On Wednesday, 13 November 2013 03:04:16 UTC, Joe Fl wrote: > > Hi Gary, > > I found this on stackoverflow and it seems straight forward and easy to > use. > https://github.com/rails-sqlserver/tiny_tds/blob/master/README.md > > Another Article that might help > > http://stackoverflow.com/questions/12684416/connect-ruby-to-sql-server-2012-express > > We use activerecord at work and it good once you get the hang of it. > > Hope some of this helps. > > Joe > > > > On Tue, Nov 12, 2013 at 8:58 AM, gary <[email protected]<javascript:> > > wrote: > >> HI, >> >> Back in the days of Watir 1.8.6 it was fairly straightforward to connect >> to your sql database using dbi and odbc which was packaged with the watir >> installation. >> >> >> require 'odbc' >> require 'dbi' >> @dbconnect = 'DBI:ODBC:my odbc connection' >> @dbuser = 'username' >> @dbpass = 'password' >> >> @dbh = DBI.connect(@dbconnect, @dbuser, @dbpass) >> >> @sth = @dbh.prepare("select whatever from wherever i want") >> @sth.execute >> @details = Array.new >> @count = 0 >> while [email protected] do >> @details[@count] = row.to_s >> @count +=1 >> end >> @totalrows = @count >> @sth.finish >> >> >> >> >> The newer versions of watir (2.1) don't appear to have anything packaged >> to do this and I'm struggling with the mass of google groups, blogs etc to >> keep up and figure out how to do this, not only is it all a mass of >> confusion but nothing appears to install without being directed to yet >> another gem to install, which often results in further gem installations, >> so if anyone has any basic instructions they can post, preferably as close >> to the odbc route i was previously using that would be greatly appreciated. >> My good old trusty stuck in the dark ages of watir 1.8.6 still works a >> treat but unfortunately the browser interaction does not ;-( >> >> Many thanks, Gary >> >> -- >> -- >> Before posting, please read http://watir.com/support. In short: search >> before you ask, be nice. >> >> [email protected] <javascript:> >> http://groups.google.com/group/watir-general >> [email protected] <javascript:> >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Watir General" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
