Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
IS possible in SSIS to download/upload a file from "sub-folder"inside of a "Document library" from SharePoint 2010 since a "local computer" with SQL?
what I need to consider to be able accomplish this...
------------------


This just an draft idea that I'm sure could be feasible to be mixing sharepoint client object inside of a script inside of the ssis file.


DETECT LAST MODIFIED DATE EXCEL FILE (LOOKING) ON SHAREPOINT
(I thought this can be achieve by using "Caml designer 2013"(www.camldesigner.com)to get the code in CSOM.net because allow to select always the last modified excel file from the "Document library")

I have installed SharePoint client library (SharePoint 2010), ssis 2008r, VStudio 2010 and I am newbie in CAML and VSTO (or like an pilot will say few hours in flight !!!!).
---code
VB
'//Load site and list
ClientContext clientContext = new ClientContext("your_site"); 
Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("Document_library_name"); 
clientContext.Load(spList); 
clientContext.ExecuteQuery(); 
'//Query to access the subfolder
if (spList != null && spList.ItemCount > 0) 
{
   Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery(); 
   camlQuery.ViewXml = 
      @"<View>  
            <Query> 
               <Where><Eq><FieldRef Name='FSObjType' /><Value Type='Integer'>0</Value></Eq></Where><OrderBy><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy> 
            </Query> 
             <ViewFields><FieldRef Name='FileLeafRef' /><FieldRef Name='ID' /><FieldRef Name='ContentType' /><FieldRef Name='Modified' /></ViewFields> 
            <RowLimit>1</RowLimit> 
      </View>";  

   ListItemCollection listItems = spList.GetItems(camlQuery); 
   clientContext.Load(listItems); 
   clientContext.ExecuteQuery(); 
}

---code



But before to detect the last modified excel file I am not sure how to get connect to the SharePoint 2010 server , because I need to use my credential and pull the desire file. Something that I am sure it is that I can't use third party tool like someone else suggest me.
http://sqlsrvintegrationsrv.codeplex.com/releases/view/17652



Then on the local server run in ssis an script in Vb.net that make the necessary update of the file , after that change the file name and then finally return back that new excel version back to SharePoint server.

I have only the code for in CSOM.net to get the file ,and in DTSX the code to update the file and change the name.

Any help is appreciated.
Regards,
Posted
Updated 28-Jan-14 4:54am
v8
Comments
karthik Udhayakumar 25-Jan-14 4:48am    
Can you pls elaborate the requirement?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900