Comments
Goowee007 wrote: What is the PowerBuilder decompiler tool? I'm trying to find a PowerBuilder decompiler tool that can get the source code from .pbd or .exe.
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

SYS-CON.TV
Today's Top SOA Links


Deploying a Data Connections Library using a Feature
Quick Tip

If you’re like me at all, you like to see compete examples of how to do things.  Yes, I can usually read something and apply what I already know, but sometimes, it is nice to see a fully working example of something, before you try something on your own.  Today’s example is how to deploy a data connections library using a feature.  I already posted how to deploy a .UDCX file to a data connection library so I thought this post would go well with it.  Our example starts with a standard feature.xml file.

Now we need to build our elements.xml file.  There are two things we need to know to deploy a SharePoint list in this case.  The list template id and the feature that the deployed the list template. The first thing we need to know is the List Template Type for the data connections library.  We can figure that out by looking at the type attribute in the List element of the SDK.  Looking at that, we determine the List Template Type is 130.

<Feature xmlns="http://schemas.microsoft.com/sharepoint/"

Id="{EF18A3A1-8D0D-40a9-8BEF-B23ADE36889D}"

Scope="Site"

Hidden="False"

Title="My Data Connection Library"

Description="This deploys a data connection library">

<ElementManifests>

<ElementManifest Location="Elements.xml" />

</ElementManifests>

</Feature>

We now need to figure out the feature id.  There is a number of ways to do this (and maybe it is even documented somewhere), but I went with a more brute force approach.  I knew that the Records Center site template provisioned a data connection library, so I went to the SiteTemplates folder in the 12 hive and found the SPSREPORTCENTER folder.  Looking at the onet.xml file inside, I found the line I needed.

<List Title="$Resources:spscore,ReportCenterOnet_
DataConnectionsListInstanceName
" FeatureId=
"
00BFEA71-DBD7-4F72-B8CB-DA7AC0440130" Description=
"
$Resources:spscore,ReportCenterOnet_
DataConnectionsListInstanceDescription
" Url="Data Connections" Type="130" />

There is the FeatureId and the Type again.  Note the FeatureId of 00BFEA71-DBD7-4F72-B8CB-DA7AC0440130.  For some reason, they never use brackets with the GUID on the Id here.  Not sure if that is required or not.  We can pretty much use this line in our elements file, but we do need to make some changes, since elements.xml needs a ListInstance element instead of a List element.  Here is what our ListInstance element looks like.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<ListInstance FeatureId="00BFEA71-DBD7-4F72-B8CB-DA7AC0440130"
Id
="{7C6924D1-5704-4a6f-9C6C-04902A312252}" TemplateType="130"
DocumentTemplate
="130" Title="Data Connections" Url="DataConnections"
OnQuickLaunch="FALSE" Description="My Data Connection Library." />

</Elements>

As you can see it’s pretty similar.  Be sure and give it a unique Id.  You can customize the Url to your liking.  One thing I will point out is that you should not set RootWebOnly to true on this list.  If you do, you will get an Object Reference not found error and the list will not deploy.  Copy your feature files out to your 12 hive.  Then install and activate your feature.  You should have a data connections library at the URL you specify.  I will point out that the library won’t show up in the Lists on your site, nor will there be any navigation to it, but it will be there.  I hope this quick tip today helps you.

Read the original blog entry...

About Corey Roth
Corey Roth is a consultant at Stonebridge specializing in SharePoint for clients in the energy sector. He has more than ten years of experience delivering solutions in the energy, travel, advertising and consumer electronics verticals.

Corey specializes in delivering ECM and search solutions to clients using SharePoint. Corey has always focused on rapid adoption of new Microsoft technologies including Visual Studio 2010, .NET Framework 4.0, and Silverlight.

He is a member of the .NET Mafia (www.dotnetmafia.com) where he blogs about the latest technology and SharePoint. He is dedicated to the community and speaks regularly at user groups and SharePoint Saturdays.

Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE