Disclaimer: This ruby/sql issue is indirectly related to this user group, 
but after scouring the internet and not having luck I thought I'd check if 
anyone in the Watir community has overcome this issue.  I am trying to 
connect to MS SQL Server inside a ruby script that contains some 
watir-webdriver commands.  I have installed FreeTDS via Homebrew and 
installed the TinyTds, activerecord (3.2.3) and 
activerecord-sqlserver-adapter (3.2.8) gems as these all appear necessary. 
 I am using some examples found at 
https://github.com/rails-sqlserver/tiny_tds while plugging in our 
user/pass/host info.  Does anyone know what is happening if I get an error 
of: "uninitialized constant TinyTds (NameError)"

*require "rubygems";*
*
*
*client = TinyTds::Client.new(:username => 'username', :password => 
'password', :host => 'hostname')*
*
*
*result = client.execute("SELECT TOP 10 * FROM [DB.DBO.tablename] ORDER BY 
ID DESC")*
*
*
*result.each do |row|*
*  result.affected_rows*
*  puts row["id"]*
*end*
  
Thanks,

Matt

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

Reply via email to