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());
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.