Skip to main content

Error - 'String or binary data would be truncated'

I cannot upgrade FactoryMaster due to the following error:- Database error SERVERNAME: String or binary data would be truncated'

B
Written by Bogdan Branetiu
Updated this week

The functionality has been enhanced in Factorymaster version 20.12.01. Please upgrade. If you are not in a position to upgrade please see below.

The issue is in version 20.11 which adds a 'salutation' field to the USERS table but it converts the existing data using the 'Full Name' of the user record. The Full Name field in your data has records which exceed 30 characters and is therefore longer than the 'salutation' field and causes the conversion to fail.
This will be fixed in the next sub release which will restrict the 'salutation' to be up to the 30 characters of the Full Name which would mean that the actual 'salutation' field is truncated but it won't error.

A alternative solution is to check the user records which exceed 30 characters from the FactoryMaster database:

SELECT * FROM USERS WHERE LEN(Full_Name) >= 30


You can then either for each record:

Use SQL to reduce the 'Full Name' field to be less than or equal to 30 characters or change the records in FM manually.

Or, use FactoryMaster to manually reduce the 'Full Name' field to be less than or equal to 30 characters.
Then upgrade to 20.12 and change the 'Full Name' back to its previous length.

Did this answer your question?