I created a UDCX file for data connection using SQL Server authentication in InfoPath form of SharePoint 2010. After that, I created a secure storeId which has credentials stored for SQL authentication. Removed the username and password from the UDC file and added it back to data connection library .

The udc file contents

  <?xml version="1.0" encoding="UTF-8"?>
  <?MicrosoftWindowsSharePointServices ContentTypeID="0x000000000000000000000000000"?>
  <udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="http://schemas.microsoft.com/office/infopath/2006/udc">
     <udc:Description>Format: UDC V2; Connection Type: Database; Purpose: ReadOnly; Generated by Microsoft InfoPath 2010 on 2016-08-20 at 19:30:42 by MyId.</udc:Description>
      <udc:Type MajorVersion="2" MinorVersion="0" Type="Database">
         <udc:SubType MajorVersion="0" MinorVersion="0" Type=""/>
    <udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
        <udc:ConnectionString>Provider=SQLOLEDB.1;Persist Security Info=True;Initial Catalog=databasecatalogname;Data Source=fqdnservername;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=machinename;Use Encryption for Data=False;Tag with column collation when possible=False</udc:ConnectionString>
        <udc:ServiceUrl UseFormsServiceProxy="false"/>
        <udc:Query>select "field1","field2" from "dbo"."tablename" as "tablename"</udc:Query>
        <udc:ServiceUrl UseFormsServiceProxy="false"/>
        <udc:FileName>Specify a filename or formula</udc:FileName>
        <udc:FolderName AllowOverwrite=""/>
    <udc:Authentication><udc:SSO AppId='securestoreid' CredentialType='Sql' /></udc:Authentication>

I am getting following error

Data adapter failed during OnLoad: Current configuration settings prohibit embedding username and password in the database connection string.

1 Answer 1



SharePoint Central Admin ->general application settings-> Configure InfoPath Forms Services. Check the box next to Allow embedded SQL authentication and click the OK button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.