SharePoint 2010 published InfoPath form encounters data connection error to SQL2016 - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

Last post 12-02-2021 09:27 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-29-2021 05:55 PM

    • ocsnew
    • Not Ranked
    • Joined on 11-26-2021
    • Posts 3

    SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

    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: "A database that contains data required for this form to function correctly cannot be found"

    Upon checking the database server logs, the following is the error: "Login failed for user 'username'. Reason: Password did not match that for the login provided. [CLIENT: clientname]"

    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.

    Can you please help or suggest ideas why the error occurs only for that specific situation?
  • 12-01-2021 08:43 AM In reply to

    Re: SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

    Well ick. It seems like the form is able to find the UDCX file, since it is actually logging into the database..... I think I'd probably double check the manifest file (save the form as source files, open manifest.xsf in a text editor) and see if there is anything in the SQL connection stuff or the path to the UDCX that seems off. I also wonder if running a tool like Fiddler might show the query to the UDCX file (I'm not sure if it will) so you could verify that the form is actually using the data from the UDCX. Finally - is there any chance the UDCX file has been saved in more than one location, and one doesn't have the password? Oh, or perhaps it isn't approved in the library? Oh, one more thing I found online: SharePoint Central Admin ->general application settings-> Configure InfoPath Forms Services. Check the box next to Allow embedded SQL authentication
    Hilary Stoupa

  • 12-01-2021 08:07 PM In reply to

    • ocsnew
    • Not Ranked
    • Joined on 11-26-2021
    • Posts 3

    Re: SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

    We checked the UDCX file and it has the passwords as well as approved in the Library. Central Admin is already configured properly. Actually, I forgot to mention but previously, the form was already using a UDCX file to connect to a SQL 2008 R2 database successfully. We recently migrated the database to SQL 2016, updated the UDCX file connection string to point to the SQL 2016 DB instead. Then we get the error. When we switch it back to the previous UDCX file, it successfully connects again to the SQL 2008 R2 database.
  • 12-02-2021 07:36 AM In reply to

    Re: SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

    Ohhhhh. Interesting. Super dumb question - you've verified the user name and password on the SQL 2016 server by logging in with that account? Like, in SSMS, or something? :)
    Hilary Stoupa

  • 12-02-2021 07:56 AM In reply to

    • ocsnew
    • Not Ranked
    • Joined on 11-26-2021
    • Posts 3

    Re: SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

    Yes, the login is working from SSMS using the same credentials from the UDCX file. The data connection even works while in InfoPath edit / preview mode. The error only happens from the published form in the library.
  • 12-02-2021 09:27 AM In reply to

    Re: SharePoint 2010 published InfoPath form encounters data connection error to SQL2016

    Oh yes, sorry, you had mentioned it worked in preview and I'd already forgotten that. I've done some additional web searches (and I'm sure you have too) but I'm not finding anything that seems applicable. I doubt a SQL Trace would provide any additional info that the logs haven't, but I might try that, just see if there is anything different between Preview vs. the browser....
    Hilary Stoupa

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.