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]> 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]
> 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.
>

-- 
-- 
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.

Reply via email to