Microsoft KB Archive/891161

= Data connections that use the same data source are no longer valid after you change one of the connections in InfoPath =

Article ID: 891161

Article Last Modified on 5/2/2007

-

APPLIES TO


 * Microsoft Office InfoPath 2007
 * Microsoft Office InfoPath 2003
 * Microsoft Office InfoPath 2003, Service Pack 1 (SP1)

-



SYMPTOMS
When you change a data connection in Microsoft InfoPath 2007 or in Microsoft Office InfoPath 2003, the data connections that use the same data source are no longer valid. This problem occurs when the following conditions are true:
 * You have two or more data connections that use the same Web service.
 * You change one of the data connections to use the Web service from a different namespace.

Note If you re-bind the data connection by using the Change Binding command, the bindings are not corrected.



CAUSE
This problem occurs because InfoPath does not consider the namespace of the data source node for the connection that is being changed. If you change the data source for one data connection, all the connections that have the same data source are changed.



WORKAROUND
To work around this problem, use one of the following methods:
 * Remove the controls from the view where the binding is broken, and then add them again to the view.
 * Change all data connections to the new location or namespace before you deploy the form.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Steps to reproduce the behavior
 Start InfoPath. Click Design a Form. Add a data connection to a Web service. To do this, follow these steps:  In the Design a Form task pane, click New from Data Connection. In the Data Connection Wizard, click Web service, and then click Next. Select Receive data, and then click Next.</li> Type the location of the Web service that you want to use as your data connection, and then click Next.</li> Select the Web service operation that you want to receive data from, and then click Next.</li> Type a name for this data connection, and then click Finish.</li></ol> </li> In the Data Source task pane, expand the dataFields group, and then drag a field or group into the current view.</li> Add a second data connection to use the same Web service that you used in step 3. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> On the Tools menu, click Data Connections.</li> In the Data Connections dialog box, click Add.</li> In the Data Connection Wizard, click Receive data, and then click Next.</li> On the next wizard page, click Web service, and then click Next.</li> Type the location of the Web service that you used in step 3, and then click Next.</li> Select the same operation that you selected in step 3e, and then click Next.</li> Follow the instructions to complete the wizard.</li></ol> </li> In the Data Connections dialog box, click Close.</li> In the Data Source task pane, under Data Source, select the secondary data source that you created in step 5.</li> Under dataFields, drag the field or group that you worked with in step 4 into the current view.</li> <li>On the Standard toolbar, click Preview Form, and then click Run Query.

Notice that the controls display the same data.</li> <li>Click Close Preview. On the Tools menu, click Data Connections.</li> <li>Select the primary data source, and then click Modify.</li> <li>Type a Web service location for this data source, click Next, and then follow the instructions to complete the wizard.

Note You must use the same Web service and operation as the one that you originally used. However, use a different namespace.</li> <li>Click Preview Form, and then click Run Query.

Notice that the control of the secondary data connection does not display data from the first Web service as expected even though you did not change the data source for this control.</li></ol>

Additional query words: namespace IP2007

Keywords: kbdesign kbtshoot kbprb KB891161

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.