Missing bytes reading text or nText column from MSSQL Server with SQLDatabaseMBS via FREETDS on OSX

Hi everyone!
When trying to read a column of type Text or nText from MS-SQL Server from Mac, using SQLDatabaseMBS (MBS SQL Plugin) via FREETDS (libtdsodbc.dylib) the first 3 bytes are missing. And I am referring to bytes, because if you put text in, e.g. if you write 1234567890… you get back 4567890… and if you put in ???.. you get ???..
I suspected that it might have to do something with the encodings, but it seems that I am missing the bytes before they get into Xojo.

For varchar or nvarchar columns there is no such problem…

Any ideas on how to solve this will be greatly appreciated!

could this thread be related?

Yes Louis, thank you very much!!! that solved it!

You have to add the following code:

db.Option("ODBCAddLongTextBufferSpace") = "false"

where db is a SQLDatabaseMBS object.

The same that works for varchar(max) seems to work for Text type also!