Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/FAQ/Administration of M-Files

SQL Server Native Client doesn't save password to the connection string (Solution)

Last updated on 24 September 2021

Admin
M-Files Admin

Overview

If for some reason one must utilize this OLE DB provider SQL Server Native Client OLE DB Provider (SQLNCLI…), which is not a recommended provider, there might be problems when trying to save the account password to the connection string.

Impacted Products and Versions

At least SQL Server Native Client 10.0 and 11.0.

Symptoms

When defining an external object's data link properties including entering the user name, allowing saving password and entering password for the connection, the connection test might be successful. After approving the settings with OK, trying to refresh the columns might lead to "Connection to external database failed" error. You can see, that the OLE DB connection string does not contain the password and the "Persist Security Info" is set to False.

image.png
 

Cause and Reason

This is caused by incorrect behavior by the external OLE DB provider. Although this provider might still have some use cases, we don't generally recommend using it. More information about recommended providers can be found from here:
https://www.m-files.com/user-guide/latest/eng/external_database_provider_recommendations-1.html

Solution
Edit the OLE DB connection string as follows:
  • Change the value of "Persist Security Info" from False to True
  • Add a new field: Password=AddTheActualPasswordHere;
Try refreshing the columns now. It should be successful assuming the user account can read the table mentioned in the SELECT statement. Of course, also the password must be correct one. The password in the OLE DB connection string should not be readable after you e.g., click Define and return to this dialog with OK or save the connection configuration and return to configure it again.
image.png
 

Still need help?