Deploy Data Connection Files (.udcx) to Sharepoint Data Connection Library

The following xml snippets gives you an example about how to construct a feature that will deploy a data connection file (.udcx) into a pre-created data connection document library in Sharepoint (The current sample is using only one data connection file but feel free to include as many as you need):

Feature.xml:

 <Feature
    Title=”Data Connections Feature”
    Description=” Data Connections Feature”
    Version=”1.0.0.0″
    Scope=”Site”
    Hidden=”FALSE”>
  <ElementManifests>
    <ElementManifest Location=”Elements.xml” />
    <ElementFile Location=”GetUserProfileByName.udcx” />
  </ElementManifests>
</Feature>

Elements.xml:

 <Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>
  <Module Url=”MyDataConnectionsDocLibrary” RootWebOnly=”TRUE”>
    <File Url=”MyDataConnection.udcx”>
      <Property Value=”Universal Data Connection File” />
    </File>
  </Module>
</Elements>

 The only trick is to set the ContentType property of the deployed file to the “Universal Data Connection File” value because Data Connection library doesn’t have this content type set as default.

32 comments to Deploy Data Connection Files (.udcx) to Sharepoint Data Connection Library

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Spam Protection by WP-SpamFree