I Use FileStream to Insert file into column with Varbinaray(Max). This is my sample code :
byte[] dataBytes = File.ReadAllBytes(fileNameAndPath);
string insertCommand = string.Format(@" INSERT INTO [dbo].[ts000Attachments] ([Data]) values (@Data)");
command.Parameters.Add("@Data",SqlDbType.VarBinary,-1).Value = dataBytes;
command.ExecuteNonQuery();
above code work with .doc file. How to fix this Problem.