|
The ability to insert a file into a VARBINARY(MAX) or VARCHAR(MAX) column using OPENROWSET is an awesome tool. The obstacle comes when you wish to insert all or specific files from a foler into sql. To do this you can use the System.IO namespace and utilizing directory and file objects you can iterate through all, or selected files in a path specified in the above clr stored procedure. After deploying this proc I would recommend adding a default value to the extn input parameter of '*.*', which indicates all files.
Read More..
|