I am trying to create an SSIS package that gets a folder tree structure from a remote SQL DB and recreates that structure in a document library in Sharepoint.
I tried to (hard) code a Script Task to create just one folder but I'm getting this error:
http://img856.imageshack.us/img856/1386/helpel.png
After running only a part of this script:
Microsoft.Sharepoint.Client.dll
Microsoft.Sharepoint.Client.Runtime.dll
public void Main()
{
ClientContext clientContext = new ClientContext("http://spdemo.example.com/");
clientContext.Credentials = new System.Net.NetworkCredential("admin", "password", "SPDEMO");
Web rootWeb = clientContext.Web;
Dts.TaskResult = (int)ScriptResults.Success;
}
I've scoured the internet for solutions, but haven't found something that works for me.
So basically i need to find out how to:
- create a folder
- populate it with sub-folders
- Copy files in bitestreams from SQL to Sharepoint, all in SSIS
Thanks in advance!
Regards,
Vlad Ardelean
Best Answer
After some research I found out that in order to reference a DLL in a SSIS Script Task it first has to be strong named
Instead, I have found an easier way to create folders and upload files:
url : represents the url path of the folder you want to create
destinationName: path + document name