Dataconnections in InfoPath and SharePoint

Dataconnections in InfoPath and SharePoint

Introduction

This walk­through is based on screen­shots of a dutch envi­ron­ment. This how­ev­er should not be a prob­lem. These screens in any oth­er lan­guage would have the same options on the exact same spot. You even might learn a lit­tle Dutch while you’re at it.

What we are going to do here is cre­ate a dat­a­con­nec­tion and even­tu­al­ly save it to a con­nec­tion­sli­brary in Share­Point as a .udcx file.

Create dataconnection

Cre­ate a dat­a­con­nec­tion in infopath.

Select Data­base (Microsoft SQL Serv­er only)

And click Next

Click op Data­base Selecteren

Select New SQL serverconnection.odc

And Click open

Enter the server­name and select the type of cre­den­tials you would like to use. Click Next.

When you choose to use user­name and pass­word it rec­om­mend­ed to save these cre­den­tials in the file.

Select a table and Click Next.

Select the fields that need to be read.
and Click Next, Next and  Fin­ish.

Convert the dataconnection

Select the con­nec­tion we’ve just cre­at­ed and Click con­vert.

Select the dat­a­con­nec­tion­sli­brary in Share­Point and name the file. Make sure to add the .udcx exten­sion.

And Click OK.

Delete the orig­i­nal dat­a­con­nec­tion and Click Add.

Select search the Microsoft Office Share­Point Serv­er for con­nec­tions.

And Click Next.

By click­ing the Man­age Sites but­ton add the site that holds the dat­a­con­nec­tion­sli­brary.

Open the dat­a­con­nec­tions fold­er and select the new­ly cre­at­ed dat­a­con­nec­tion.

Click Next.

Name the new con­nec­tion and click Fin­ish.



The new dat­a­con­nec­tion is ready for use.

Security settings in SharePoint

Make sure the user has all the required per­mis­sions on SQL Serv­er.

If you have hard­cod­ed the cre­den­tials (in con­nec­tion string, UDCX file, etc), “Allow embed­ded SQL Authen­ti­ca­tion” must be enabled under Cen­tral Admin -> Appli­ca­tion Man­age­ment -> Con­fig­ure InfoPath Forms Ser­vices.

Make sure to have cross-domain access enabled for Infopath Forms Ser­vices under Cen­tral Admin -> Appli­ca­tion Man­age­ment -> Con­fig­ure InfoPath Forms Ser­vices and also have this set­ting enabled in Inter­net Explor­er for the zone InfoPath form loads.

Have both SQL and Win­dows authen­ti­ca­tion enabled on SQL serv­er

If your brows­er enabled form is not work­ing with Win­dows cre­den­tials, try using SQL cre­den­tials.