Hi everyone,
Does anyone know how to store files directly in a database?
I need to develop an upload feature on a Website and I would like to store the uploaded files in SQL Server. I tried to use the text data type for this and insert the file in it:
It seems to be working but in fact the file is not completely stored (I only have part of the file). And when I try to insert and retrieve an RTF file, it only works with a 64Kb file.
I also tried several other solutions I found in SQL Server documentation but nothing worked :-(
Thanks for your help.
Does anyone know how to store files directly in a database?
I need to develop an upload feature on a Website and I would like to store the uploaded files in SQL Server. I tried to use the text data type for this and insert the file in it:
Code:
insert into Files (fileName, mimeType, blobFile) values ('myFileWithExtension', 'mimeTypeOfTheFile', 'contentOfTheFile')
It seems to be working but in fact the file is not completely stored (I only have part of the file). And when I try to insert and retrieve an RTF file, it only works with a 64Kb file.
I also tried several other solutions I found in SQL Server documentation but nothing worked :-(
Thanks for your help.