TinyTds returns max 64512 byte w/ Image column

145 views
Skip to first unread message

Jeremy Ross

unread,
May 2, 2011, 12:00:27 PM5/2/11
to Rails SQLServer Adapter
Hi,

I'm using TinyTds to query a table with an Image data type. However,
it seems to be capping the value at 64512 bytes. Is this a limitation
of TinyTds?

Ken Collins

unread,
May 2, 2011, 12:08:12 PM5/2/11
to rails-sqlse...@googlegroups.com

Both SQL Server and FreeTDS support user settings to limit certain column data returned to avoid excessive memory. The text size is the setting that does this for both text and image data types. In FreeTDS, it is possible to have this configuration in the freetds.conf file

http://www.freetds.org/userguide/freetdsconf.htm

But ultimately this too is a core setting in SQL Server. See the SET TEXTSIZE documentation and things like dbcc user options. TinyTDS should not get in the way of these settings. We even have a few tests too. Things are kind of murky when there is no freetds.conf in scope, the default should be controlled by SQL Server at that point. Let me know what you find out.

- Ken

Jeremy Ross

unread,
May 2, 2011, 1:01:43 PM5/2/11
to Rails SQLServer Adapter
Changing "text size" setting in freetds.conf fixed the problem. Thanks
for the quick response, Ken.

Jeremy
Reply all
Reply to author
Forward
0 new messages