"String or binary data would be truncated" error

"String or binary data would be truncated" error

  
"String or binary data would be truncated" error is issued when creating or updating database records where one of the values length is greater than the attribute's length.

For instance you are trying to insert the “usernamewith19chars” value in the Username attribute in the User entity and this attribute's Length is 16.

Using the error stack you can see where the error is being issued in the eSpace and find out which entities might be affected.
To fix this you can:
- Trim the value before creating/updating the record (ex: using Substr() function)
- Validate the value before creating/updating the record (ex: using input widgets “Max. Length” or using application logic)
- Increase the attribute length if it is not a shared entity
Hi,

I'm using EM template Login,

I Get this error when I login with user xxxx.xxxxx@gmail.com
I tried the same login in developement mode, but it went ok.

The error is on the Login_LoginAction of Enterprise Manager.

Did you ever came up with something like this?

Hope you can help me,

Best Regards,

Francisco Neto
I Francisco,

The error you are reporting is caused by one field in an entity that has a shorter length than the data you are trying to put in it. It is strange that it is behaving differently in production and development. Do you have the same versions and data for that user in both environments?

If you can not trace the error I suggest you send the error logged in OutSystems Service Center to support@outsystems.com.

Cheers,
Tiago Simões