hai,
i wish to know, how to insert the byte array file into a sql table and also is it possible to insert large files.
Thank you
How to insert the bytearray file into a sql table
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Krishna GaradRank #191 · 12.8K reputationPosted Jan 27, 2011, 8:32 PM EST
(
@data varbinary(max)
)
as
Insert statement
end
Convert byte file into byte array
byte[] _data;
private void PreapareByteArray()
{
if (FileUpload1.HasFile)
{
using (BinaryReader reader = new BinaryReader(FileUpload1.PostedFile.InputStream))
{
_data = reader.ReadBytes(FileUpload1.PostedFile.ContentLength);
}
}
}
Pass this _data to insert statement it will insert byte array to sql table.
Suthish NairRank #92 · 22.8K reputationPosted Jan 30, 2011, 8:21 AM EST
So other members can easily find the answers.