Skip to content

Instantly share code, notes, and snippets.

@mizanRahman
Created April 24, 2013 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mizanRahman/5452035 to your computer and use it in GitHub Desktop.
Save mizanRahman/5452035 to your computer and use it in GitHub Desktop.
working with sql server 2008 using ruby
require 'tiny_tds'
client = TinyTds::Client.new(:username => 'sa', :password => 'secret', :host => 'localhost')
client.execute("use testdb").do
result = client.execute("select * from person")
result.each do |row|
p row
end
client.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment