Sladescross's Blog

Blogging about Sharepoint related stuff

Infopath Create And Use Data Connection Library September 24, 2009

Filed under: Deployment,Infopath,Sharepoint,Universal Data Connection — sladescross @ 8:33 pm


Uploading data connection files to a Data connection library allows InfoPath form templates to use the data sources described by these files to retrieve and submit information.

To Create a SharePoint Data Connection Library

  1. Browse to an Office SharePoint Server 2007 or Office Forms Server 2007 site on which you have at least Design rights. If you are on the root site, or portal, go to the Document Center or create a new site before proceeding to the next step.
  2. Click Create on the Site Actions menu.
  3. On the Create page, click the Data Connection Library link in the Libraries section.
  4. On the New page, type a name for the library and click the Create button.
  5. Copy the URL of the new library.

To Create a New Data Connection File in InfoPath

  1. Open Office InfoPath 2007 and click Design a Form Template.
  2. On the Design a Form Template dialog box, click Blank and click OK.
  3. On the Tools menu, click Data Connections.
  4. Click the Add button.
  5. In the Data Connection Wizard, click Create a new connection to and Receive data.
  6. Click Next.
  7. Click the type of data source you are connecting to, such as Database, Web service, or SharePoint library or list.
  8. Click Next.
  9. Configure your data connection as needed to retrieve data. Once the Data Connection Wizard is completed, choose this data connection in the Data Connections dialog box.
  10. Click Convert.
  11. On the Convert Data Connection dialog box, enter the URL of the data connection library that you previously copied.
  12. Delete “Forms/AllItems.aspx” in the URL.
  13. Enter a name for the data connection file at the end.
  14. Click OK.
  15. Confirm that the data connection has been converted successfully by examining the Details section of the Data Connections dialog box while the converted data connection is selected.
  16. Browse to the SharePoint data connection library and, if necessary, Check In and Approve the UDC file created.

To set up a centrally managed data connection do the following:

  • From your InfoPath form select Data Connections… from the Data menu
  • Select the data connection you want to make centrally managed and click the Convert button
  • A .udcx file will be created in a site collection data connections library you select so it may be necessary to set up a data connections library first
  • Navigate to the site collection data connections library and save the .udcx file locally
  • Go to SharePoint Central Administration – Application Management – Manage Data Connection Files
  • Upload the .udcx file to the central data connection files library
  • Go back to the InfoPath form and remove the existing data connections.
  • Recreate the data connections using Search for connections on a Microsoft Office SharePoint Server
  • Create the connection using the .udcx file that was saved to the site collection data connection library but make sure that you click on Connection Options… and select Centrally Managed
  • Configure the controls on the form to use the data connection as normal

The form will now use the centrally managed data connection. To deploy to another environment (eg. UAT, Production) you will need to upload the .udcx file to the relevant SharePoint Central Administraion after altering it to use the connection properties relevant to the new environment. To update the .udcx file open it in a text editor and alter the following parameters (example is for a connection to a SharePoint list):


Where ListId is the SharePoint list id and WebUrl is the url of the site collection that holds the SharePoint list.

When you deploy your InfoPath form it will reference the centrally managed .udcx file allowing it to seamlessly connect with data in the new environment.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 63 other followers