How to solve - String or binary data would be truncated.

Hello guys,


I am having a issue when a try to upload pdfs in my application. The error that appears is :

String or binary data would be truncated. The statement has been terminated.

I already tried to upload Word, Excel formats and works fine, but pdf didn't seems to work exactly the same way. I tried to upload pdf files with 50000 bytes and even more and not all works. I've tried also upload files just with 5000 bytes and also doesn´t worked. 


Can anyone explain me with this happen and how can i solve it please?


Regards,


Pedro Santos

IH! 

That's strange. 

Could you share an example?

Graça

Hi Pedro Santos,

 It might be due to a filename or content type. Those are sometimes large and do not fit with the limit we defined in entities.

Can you share the Service Center log, I am pretty sure we will get a clear idea of which entity is throwing this exception for a limit of attribute & would help me or folks here to resolve.


Assif

assif_tiger wrote:

Hi Pedro Santos,

 It might be due to a filename or content type. Those are sometimes large and do not fit with the limit we defined in entities.

Can you share the Service Center log, I am pretty sure we will get a clear idea of which entity is throwing this exception for a limit of attribute & would help me or folks here to resolve.


Assif

 

 Hey Assif,

I encountered a similar situation with the same error when downloading a picture from an url. Is there any recommendations which range is suitable for the length property for fields like "filename" or "filetype"?


Regards

Torben

Hi Pedro,

Complementing what the staff commented, change the fields in your table to the ideal one for your file name.

Alter Length to 100 or 200.

Regards.