Skip to content

smmankad/BLOB2File

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BLOB2File

This is a small console program created in C# which dumps SQL Server BLOBs to files on the hard disk.

Assumptions

  • There is a column for BLOBs
  • The full filenames (with extensions) have their own column too
  • Both these columns reside in the same table

How it works

  • The SqlDataReader picks up the row
  • The BLOB is fed into a byte array
  • This byte array alongwith the filename (from the reader again) is passed to a method that writes the file
  • The path is specified in the method that writes the file
  • Once the file stream is closed, the reader moves to the next row and the cycle repeats.

This code has been built using Visual Studio 2013 Express and used on Microsoft SQL Server 2008 R2 Express as well as 2012 Express.

About

This is a small console program created in C# which dumps SQL Server BLOBs to files on the hard disk.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages