c# - How to save file in SQL Server database if have file path? -


I am creating some C # desktop applications and I have to save the file to the database. I have come up with some file selector who is giving me the correct path of the file. Now I have a question about how to use that file using its database and its path.

  filestream fs = new filestream (filename, filemodel, open, fileaccess read); Binaryreader BR = new binary reader (FS); Int numBytes = new FileInfo (fileName) Lamps; Byte [] chef = br.ReadBytes (numBytes);  

Then you upload it to DB in something else, I think you are using a varbinary column (Blob)

Are

Comments

Popular posts from this blog

php - multilevel menu with multilevel array -

c# - TypeConverter in propertygrid only converts from string, not to -

jQuery UI: Datepicker month format -