Question

File storage in database

  • 3 May 2024
  • 1 reply
  • 47 views

Userlevel 4
Badge +13

According to the documentation it’s possible to store files in the database. I understand this takes two columns: one to store the filename and the other to store the file contents. So far so good. But how do I get to set the storage column as mentioned in the manual? I tried a bunch of combinations between datatypes and controls but so far the field hasn't popped up.


1 reply

Userlevel 4
Badge +3

Hello Roland,

If we use the Software Factory as an example, in the case of icons we simply have the icon column, which is supported by the icon_data column.

The icon column uses a domain that has an image upload control (but this can also be a file upload) which in turn uses a storage location with the storage type Database. Selecting a domain with this type of storage location causes the Storage column field to appear in the Column form. In this field you want to select the second column in which the file contents can be stored, which in our case is the icon_data column, which has a domain with a simple varbinary_max datatype.

Hopefully this helps!

Kind regards,

Renée

Reply