By the way: Sequel is awesome. I am using it to migrate data between SQL Server and MariaDB and other than making sure the database field sizes are compatible, the process couldn't be easier.
Thanks again, Eduardo On Friday, February 5, 2021 at 12:42:24 PM UTC-6 Eduardo Kortright wrote: > That did it! Thank you very much for your quick response. > > On Friday, February 5, 2021 at 12:30:56 PM UTC-6 Jeremy Evans wrote: > >> On Fri, Feb 5, 2021 at 9:49 AM Eduardo Kortright <[email protected]> >> wrote: >> >>> >>> Hello, >>> >>> I am using Sequel 5.41.0 to connect to a SQL Server database using the >>> tiny_tds gem and the tinytds adapter. >>> >>> I just noticed that when retrieving certain large columns the returned >>> value is getting truncated to 2,048 characters. >>> >>> In SQL Server, the columns are defined as nvarchar(max), which could >>> hold over 2 billion characters, but in my case I have values ranging from >>> several thousand to almost 4 million characters. >>> >>> When I execute DB.schema(:mytable), I see a property "max_chars" for the >>> nvarchar(max) column that has the value -1. Other columns defined as >>> nvarchar(4000), for example, show max_chars = 4000, and the returned value >>> can be as large as 4000 characters. >>> >>> Can you tell me how to handle the nvarchar(max) columns? >>> >> >> Try using the :textsize option when connecting, as described in: >> http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-tinytds >> >> . If that doesn't work, please post a minimal self contained example >> showing the problem and I'll test with it. >> >> The :max_chars schema entry being -1 is expected. The :max_length schema >> entry is the one Sequel uses to actually specify behavior such as setting >> validations, and it not set for cases where :max_chars < 0. >> >> Thanks, >> Jeremy >> > -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/8e9a5ce9-b373-45d3-9430-3ac7c9b09a89n%40googlegroups.com.
