As mentioned earlier, storing binary data in a database is usually not a good idea.
Wouldn't it be enough to store the file on disk, where document id / PK becomes the file name and stores only the file name / id, the original file name and file description in the database?
This will solve most of your problems:
It also prevents problems with the rapidly growing database size and the writing and support of additional code for storing, searching and maintaining documents stored in the database.
If you really only need a link to a document, this is, in my opinion, the best solution.
- VB6 Microsoft, -.
, ( , ), , .
!