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

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -