Вместо загрузки этого файла в локальный файл, вы можете преобразовать его в объект потока байтов и сохранить его как varbinary (MAX) BLOB в SQL Server.
Учитывая, что ваш стол выглядит так:
CREATE TABLE [dbo].[Documents](
[DocumentId] [int] IDENTITY(1,1) NOT NULL,
[DocumentTypeId] [int] NOT NULL,
[UploadedByMemberId] [int] NOT NULL,
[DocumentTitle] [nvarchar](200) NOT NULL,
[DocumentDescription] [nvarchar](2000) NULL,
[FileName] [nvarchar](200) NOT NULL,
[DateUploaded] [datetime] NOT NULL,
[ApprovedForUsers] [bit] NOT NULL,
[ApprovedByMemberId] [int] NOT NULL,
[ApprovedDate] [datetime] NULL,
[DocBLOB] [varbinary](max) NOT NULL,
CONSTRAINT [PK_Documents] PRIMARY KEY CLUSTERED
(
[DocumentId] ASC
)
SqlParameter Title = new SqlParameter("@Title", SqlDbType.VarChar);
SqlParameter FileName = new SqlParameter("@FileName", SqlDbType.VarChar);
SqlParameter DateFileUploaded = new SqlParameter("@DateUploaded", SqlDbType.VarChar);
SqlParameter DocBLOB = new SqlParameter("@DocBLOB", SqlDbType.VarBinary);
command.Parameters.Add(Title);
command.Parameters.Add(FileName);
command.Parameters.Add(DateFileUploaded);
command.Parameters.Add(DocBLOB);
myStringWebResource = remoteUri + dataReader["FileName"].ToString();
imgdownload = myWebClient.DownloadData(myStringWebResource);
querySQL = @"INSERT INTO Documents(DocumentTypeId, UploadedByMemberId, DocumentTitle, DocumentDescription, FileName, DateUploaded, ApprovedForUsers, ApprovedByMemberId, ApprovedDate, DocBLOB) VALUES(1, 0, @Title, '', @FileName, @DateUploaded, 1, 0, GETDATE(), @DocBLOB);";
Title.Value = dataReader["Title"].ToString().Replace("'", "''").Replace("\"", "");
FileName.Value = dataReader["FileName"].ToString().Replace("'", "''").Replace("\"", "");
DateFileUploaded.Value = dataReader["DateUploaded"].ToString();
DocBLOB.Value = imgdownload;
command.CommandText = querySQL;
command.ExecuteNonQuery();