Reputation: 6510
Given:
.txt
, .pdf
, .doc
filesSQL Server 2008 table
create table docs
(
id int not null identity primary key,
filename nvarchar(255),
filecontent varbinary(MAX),
filetype nvarchar(10),
)
I know how to upload file by file using INSERT
or MERGE
, but it is a long operation.
How to effectively fast upload many files into the table?
Upvotes: 0
Views: 965
Reputation: 401
use SqlBulkCopy operation so that you can insert multiple records faster.
Upvotes: 1