Download files from Database

  • 16 January 2019
  • 2 replies
  • 1 view

Hello all,


I would like to store documents, (i.e., .docx, .xlsx, .txt, etc), into a SQL table and allow the user to download the files from the k2 web app by clicking a link in the list view.  My attempts to do this have failed.  Below explains what i have done up to this point.  Also note worthy i don't want a user to upload any files.


My table structure:



Help would be most appreciated.  

2 replies

Badge +12

Hi Core 2, 


I have seen the following blog post in regards to this error, it doesn't seem to be a K2 error but more of an error based on SQL. Please have at following post below:


It could be the case the case the datatype size does match with the database field attributes, so one way to go would be to increase the datatype size on the DB side. 


Do let me know if this helps.


Kind regards, 



Userlevel 6
Badge +16



SQL Server Service doesn't support the VarBinary datatype, see link below. You might want to change to nvarchar(max).

Considerations section: