Hi
I want to insert my byte[] (byte array) to a column in my table (Data) which its type is varbinary(max) and I need to be able to download the data later so I don't want it to be changed.
Can anybody help me how can I insert buffer in my db and update it? I have used Buffer.BlockCopy(buffer,0,fl.Data,offset,count); but fl.Data varbinary type doed not match teh requirements of Buffer.BlockCopy
I also need to concat the buffer to "Data" each time a new piece arrives. and update the table
public Boolean WriteBlobsToDB(byte[] buffer,int offset,int id,string fileName,string fileType,string user,string md5){
bool ok = false;
FileList fl = new FileList();
fl.Id = id;
fl.FileName = fileName;
fl.FileType = fileType;
fl.MD5 = md5;
fl.UserID = user;
Buffer.BlockCopy(buffer,0,fl.Data,offset,count);