Created
August 2, 2016 14:39
-
-
Save ouaziz/9e790f1583a7a26ce6460f8c021f83db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "start..." | |
require 'tiny_tds' | |
client = TinyTds::Client.new username: 'sa', password: '123***s', host: '192.168.1.215', port: 1433, database: 'alyamama' | |
#results = client.execute("SELECT * FROM motif_controle") | |
#puts results.fields | |
#results.each do |row| | |
# puts row | |
#end | |
#puts "---------------" | |
results = client.execute("EXEC sp_test") | |
#results.do | |
results.each do |row| | |
puts row.values_at("CodeMotif") | |
puts row.values_at("Description") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment