minus5 / gofreetds

Go Sql Server database driver.
MIT License
113 stars 48 forks source link

nvarchar(max) fields truncated when selected #58

Closed coduspocus closed 7 years ago

coduspocus commented 7 years ago

I have a table that uses nvarchar(max) to store a URL encoded html canvas. Selecting from gofreetds only returns 2048 characters when the actual field has over 8000.

coduspocus commented 7 years ago

After further research I see that this is a connection property and not a problem with gofreetds. If I prepend my query with "SET TEXTSIZE 2147483647;" the problem goes away and I retrieve the full field length.

Here's a similar thread with Rails and activerecord