Can not create a file based on External Entity content
Application Type


- I have an external entity (eAttachment) exposed to my Reactive Project, next is the SQL definition.

- This eAttachment entity has the content of  various files that I need to migrate to OutSystems database, this table has a column( eContents) which is Image Type, and it's mapped to BinaryData.

I have One SQL action that got this data and then saved it to Internal File Entity

Until this, everything seems to be ok, but when any file is opened(PDF/DOC/PPT, etc) in de UI, an error is shown:

I have tried the next, but the error persists:

- In SQL: Use CAST / Convert to Image and back to Binary Data

- In server actions: Convert to Text / Base64 and Then to Binary Data.

Any suggestions to solve this?

Thanks in advance

Hi Juan,

It seems that the data type Image in SQL Server can be converted to Base64String with a special casting. Have you tried this cast?

If this works, you can save the image into your Entity as Base64 and while passing it to UI, you can use Base64ToBinary of the BinaryData extension.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.