Compress file to bytes for uploading to SQL Server
- by Chris
I am trying to zip files to an SQL Server database table. I can't ensure that the user of the tool has write priveledges on the source file folder so I want to load the file into memory, compress it to an array of bytes and insert it into my database.
This below does not work.
class ZipFileToSql
{
public event MessageHandler Message;
…