// Save the document to a MemoryStream object. MemoryStream stream = new MemoryStream(); doc.Save(stream, SaveFormat.Doc); string fileName = Path.GetFileName(doc.OriginalFileName); // Create the SQL command. row.Cells[1].Value =stream.ToArray(; // Add the @Doc parameter. command.Parameters.AddWithValue("Doc", stream.ToArray()); // Write the document to the database. command.ExecuteNonQuery();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)