I have an infopath form which needs to query an SQL server through a Data Connection File (.UDCX), uploaded to production Sharepoint library. The thing is, it works on my local, but not on production. When I looked it up the error log in trace files, it says:
Logon failed for user xxxx. Logon failure unknown username or bad password.
I have my connection file as follow:
<?xml version="1.0" encoding="UTF-8"?>
<?MicrosoftWindowsSharePointServices ContentTypeID="0x010100B4CBD48E029A4ad8B62CB0E41868F2B0"?>
<udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="http://schemas.microsoft.com/office/infopath/2006/udc">
<udc:Name>Staff</udc:Name>
<udc:Description>Format: UDC V2; Connection Type: Database; Purpose: ReadOnly; Generated by Microsoft InfoPath 2010 on 2012-12-06 at 14:57:29 by aat.</udc:Description>
<udc:Type MajorVersion="2" MinorVersion="0" Type="Database">
<udc:SubType MajorVersion="0" MinorVersion="0" Type=""/>
</udc:Type>
<udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
<udc:WsdlUrl/>
<udc:SelectCommand>
<udc:ListId/>
<udc:WebUrl/>
<udc:ConnectionString>Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist security info=True;Trusted_Connection=Yes;Initial Catalog=DBSERVER;Data Source=DNNAME;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MYOWNPCNAME;Use Encryption for Data=False;Tag with column collation when possible=False</udc:ConnectionString>
<udc:ServiceUrl UseFormsServiceProxy="false"/>
<udc:SoapAction/>
<udc:Query>select "ID","SchoolStaffCode","CreatedDate","CreatedBy","ModifiedDate","ModifiedBy","RegistrationNumber","StartDate","StaffCampus" from "dbo"."Staff" as "Staff"</udc:Query>
</udc:SelectCommand>
<udc:UpdateCommand>
<udc:ServiceUrl UseFormsServiceProxy="false"/>
<udc:SoapAction/>
<udc:Submit/>
<udc:FileName>Specify a filename or formula</udc:FileName>
<udc:FolderName AllowOverwrite=""/>
</udc:UpdateCommand>
<udc:Authentication>
<udc:UseExplicit CredentialType="NTLM">
<udc:UserId>DBLOGIN</udc:UserId>
<udc:Password>DNPASSWORD</udc:Password>
</udc:UseExplicit>
</udc:Authentication>
</udc:ConnectionInfo>
</udc:DataSource>
I can login to the database using the credential above, but why is that it doesn't recognize it in this case?...