SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

LanceA 1 Reputation point
2021-11-26T07:44:57.6+00:00

I have an InfoPath form published in SharePoint 2010. The form contains a data connection to a SQL Server 2016 database using a .udcx connection (uploaded in SharePoint).

The problem is that when attempting to connect using the data connection, it throws the following error:

152823-image.png

Upon checking the database server logs, the following is the error:

152825-image.png

However, please note that using the SAME credentials and connection file, it is able to successfully connect in the following cases:

  • Connecting via SQL Server Management Studio (same credentials)
  • Accessing Data Connection in InfoPath Edit Mode
  • Accessing Data Connection in InfoPath Preview Mode

It is only throwing out the error once the form is published to SharePoint.

Can you please help or suggest ideas why the error occurs only for that specific situation?

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
SQL Server | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,801 Reputation points
    2021-11-29T08:22:44.157+00:00

    Hi @LanceA ,

    Per my understanding, you could:

    1. As the error message displayed in the SQL error log, confirm whether the account password is correct. This error message shows that the connection was not successful.
    2. Check the SharePoint ULS logs for more error messages.
    3. If your SharePoint version is 2010, SQL Server 2016 is not recommended. In addition, Microsoft has stopped supporting SharePoint 2010, so I would suggest you consider upgrading your SharePoint version to adapt to the database version.
      Reference:
      SharePoint 2010 with with SQL server 14/16 in compatibility mode

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.