SharePoint 2016: An error occurred while accessing a data connection udcx file that is required

In this post, we will be fixing this issue “An error occurred while accessing a data connection udcx file that is required” that you may face when publishing an InfoPath form in SharePoint 2016 and SharePoint 2013.

You might also like to read Data Connection Library Missing In SharePoint 2016


An error occurred while accessing a data connection udcx file that is required

I have published an InfoPath form that has a data connection file stored in a data connection library and when I tried to open the InfoPath form via browser, I got the below error:

An error occurred while accessing a data connection (.udcx) file that is required for this form to function correctly. The file cannot be found or you do not have permissions to access it.

An error occurred while accessing a data connection udcx file that is required

Cause

This issue usually occurs in a case of the following:

  • The connection file is not exist in the data connection library.
  • You don’t have permission to access the data connection library.
  • The data connection library and the form library is not located in the same site collection.

Solution

In my case, I already have a data connection library that holds the connection, and I also have a permission to access it. but the data connection library and the form library are not located in the same site collection.

Steps

  • First, make sure that the data connection library and the form library are located in the same site collection.
  • Open your InfoPath form,
  • From the above ribbon, create a new data connection that receives data from a database (SQL data connection only).
  • Once you have finished, the data connection wizard, convert the data connection to a file connection.
  • When you click browse, make sure that you have selected a data connection library that located in the same site collection and also has the form library.
Convert Data Connection in InfoPath
  • Save & Publish your InfoPath form again.
  • Try to open it from a browser, the issue should be now solved.

Conclusion

To avoid this issue “An error occurred while accessing a data connection udcx file that is required” when publishing an InfoPath form that has a data connection file to a form library, you should make sure that the file connection has been converted and added to a data connection library that is located in the same site collection that has the form library.

Applies To
  • SharePoint 2016 Enterprise Edition
  • SharePoint 2013 Enterprise Edition
See Also

2 thoughts on “SharePoint 2016: An error occurred while accessing a data connection udcx file that is required”

Leave a Reply