Page 1 of 1

MongoDB driver truncating data

Posted: Tue 08 Sep 2020 16:02
by lstrjcam
I am currently using Devart's ODBC driver for MongoDB to create a linked server from SQL Server. Whenever I try to pull data from MongoDB via a linked server call, it treats records from a certain field as if it is nvarchar(8). I have confirmed that there are documents in the collection being called with fields containing more than 8 characters, resulting in data being truncated. Is there any way to set it up so that the driver does not treat records from this field as nvarchar(8)? Thanks in advance!

Re: MongoDB driver truncating data

Posted: Wed 09 Sep 2020 13:42
by ViktorV
To solve the issue, please try increasing the value of the "Describe amount" field in the "Advanced settings" tab of the ODBC Driver for MongoDB configuration dialog box.
It is recommended to set this value as close to the number of documents in the collection as possible.

Re: MongoDB driver truncating data

Posted: Mon 14 Sep 2020 12:16
by lstrjcam
I have updated the value in the "Describe amount" field to a value higher than the number of documents in the collection. However, the data was still being truncated. Did we need to restart the server in order for the driver to pick up the update?

Re: MongoDB driver truncating data

Posted: Wed 16 Sep 2020 14:49
by ViktorV
In order for us to be able to give you a detailed answer, we need to have a sample demonstrating the specified behavior.
Therefore, please create a dump of all of your collections, SQL query and sent it to us through the contact form (https://devart.com/company/contactform.html).