function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mharikian1.3892229047844834E12mharikian1.3892229047844834E12 

Salesforce LongText data type to Microsoft SQL Server Data Type

What MSSQL server data type should I use when transferring Textarea (32,000 characters) from Salesforce to my Microsoft SQL Server database?
(Ex. Account.Description)

In several examples, there are posts to use nvarchar(max) but when I use this, my integration code ends up throwing errors and stating that the values will be truncated because some of our "Account Descriptions", as an example, are longer than 4000 characters. I was looking into using a Blob, but that means I have to convert the data from binary and don't know if I want to go that route.

Has anyone else run into this issue and if so, what methods did you use to store large amounts of text in a Microsoft SQL Server which were greater than the 4000 character limit on nvarchar?

Thanks.

 
Best Answer chosen by mharikian1.3892229047844834E12
mharikian1.3892229047844834E12mharikian1.3892229047844834E12
Nevermind. It ended up being a different Text field which was set to 10 characters in Salesforce, but because there were some legacy records which were longer than the 10 character max, and Salesforce honors all existing values regardless of field size, it was erring on those values. The Long Text values are being handled properly with no problems.