I would like to know how to save a document(txt,pdf,doc,docx,xls etc) to Microsoft SQL Server using C# windows forms. Here's the form I've designed File Upload Box. I've used the openfiledialog box but I couldn't select a file. Any help would be appreciated. Thank You!
Also what kind of datatype should be used to save file in Microsoft SQL Server? Thanks!
OpenFileDialog OpenFileDialog1 = new OpenFileDialog();
OpenFileDialog1.Title = "Select a Document";
if (openFileDialog1.ShowDialog() ==
System.Windows.Forms.DialogResult.OK)
{
this.Cursor = new Cursor(openFileDialog1.OpenFile());
}