【问题标题】:Ruby Tiny_tds: nText columntype gets truncated to 32223Ruby Tiny_tds:nText 列类型被截断为 32223
【发布时间】:2016-01-12 19:36:16
【问题描述】:

我正在使用这些宝石

ruby-odbc (0.99995)
tiny_tds (0.6.2)

并像这样建立 Tiny TDS 连接

client = TinyTds::Client.new(:username => myusernmae, :password => mypassword, :dataserver => 'UKRCAN')
result = client.execute("SELECT C FROM [dbo].[Feedback] f where FeedBackId = 'DD0F1A3E-0499-401A-A4E9-7F2EC6564C52'")

其中 C 列的类型为 nText

问题是当我尝试获取 nText 列(其中包含大约 1,00,000 个字符)时,结果被截断为仅 32223 个字符。

关于如何获得此列的完整价值的任何建议

【问题讨论】:

    标签: ruby-on-rails sql-server tiny-tds


    【解决方案1】:

    通过设置 MSSQL 配置修复它

    result = client.execute("SET TEXTSIZE 1073741823")
    result.do
    

    【讨论】:

      猜你喜欢
      • 2014-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-30
      • 1970-01-01
      • 1970-01-01
      • 2023-01-29
      相关资源
      最近更新 更多