Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Code to update data source connection string and stored credentials in MOSS web part having SSRS 2012 as service application?

$
0
0

Using VS2012 I created an empty MOSS project and added a web part to it. Sand-box soln. and Feature scope is Site(Sitecollection). How to reference SSRS2012 as service application in sharepoint project so that i can update the connection string and stored credentials(user-id and password).

Why? We migrated from MOSS2007-SSRS2005 to MOSS2013-SSRS2012. So now in development environment we want to point to our new database server with new user-id and password.

My following code to reference name property works but I need a mechanisn to reference data source:

SPWeb web = SPContext.Current.Web;           
SPList dataSrcList = web.GetList("http://abc:11111/xyz/Data%20Connections/Forms/AllItems.aspx");           
lblItemList.Text = "";
SPListItemCollection items = dataSrcList.Items;
for (int i = 0; i < items.Count; i++)
{
SPListItem listItem = items[i];
lblItemList.Text += "<BR>Name: " + listItem["Name"]; //works
//lblItemList.Text += "<BR>Connection string: " + listItem["Connection string"];
//lblItemList["Connection string"] = "abc";           
//lblItemList.Update();
}



Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>