Skip to main content
Solved

File storage in database

  • May 3, 2024
  • 1 reply
  • 59 views

Forum|alt.badge.img+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.

Best answer by Renée Evertzen

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

View original
This topic has been closed for comments

Renée Evertzen
Moderator
Forum|alt.badge.img+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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings