-
-
Save sohooo/c74fc342b4ad3399f38be131cfa30953 to your computer and use it in GitHub Desktop.
DSN-less ODBC Connection with ruby-sequel
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
require 'sequel' | |
DB = Sequel.connect(:adapter=>'odbc',:driver=>'SQL Server Native Client 10.0',:server=>'localhost',:port=>1433, :uid=>'myuser',:pwd=>'mypass',:db_type=>'mssql') | |
DB.fetch("SELECT * FROM artist") do |row| | |
puts row | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment