【发布时间】:2013-12-30 00:44:06
【问题描述】:
我在 Windows 7 64 位中使用 Tiny TDS。
配置:
Ruby: 1.9.3
Rails: 4.0.0
Tiny TDS: 0.6.1
数据库.yml
development:
adapter: sqlserver
host: localhost
dataserver: PAVEI-PC\PAVEI
database: TKD_SUBD
username: pavei
password: pavei
在 Rails 控制台中
client = TinyTds::Client.new(:username => 'pavei', :password => 'pavei', :dataserver => 'PAVEI-PC\PAVEI', :database => 'TKD_SUBD')
irb(main):003:0* client.execute("teste")
TinyTds::Error: closed connection
from (irb):3:in `execute'
from (irb):3
我不知道为什么连接被关闭了!
【问题讨论】:
-
查看日志。检查防火墙。
-
windows 防火墙已关闭,日志上没有打印任何内容
-
您可以使用 GUI 或其他类型的客户端连接到此服务器吗?
-
是的,看这张图片oi44.tinypic.com/2qv72p0.jpg
标签: ruby-on-rails freetds tiny-tds