rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
607 stars 189 forks source link

Connect SQL with Windows Authentication #415

Open davidyulei opened 6 years ago

davidyulei commented 6 years ago

Environment

Operating System Win10

TinyTDS Version and Information 0.7.0

Description

TinyTds::Client.new(:dataserver =>@dataserver, :database => @database, :timeout => @login_timeout) this line of code which initialize a tiny_tds client works in win7 but not work in win10. I guess in win7, if do not provide user credential, it will pull the windows authentication to connect to sql server. But the same code does not work on win10. Did anyone encounter the issue? Thanks!

davidyulei commented 6 years ago

tinytds opts={:dataserver=>"XXXXX", :database=>"XXXX", :appname=>"TinyTds", :tds_version=>5, :login_timeout=>60, :timeout=>5, :encoding=>"UTF-8", :port=>1433}