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
command, the bindings are not corrected.
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.
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.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" 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. Type the location of the Web service that you want to use as your data connection, and then click Next. Select the Web service operation that you want to receive data from, and then click Next. Type a name for this data connection, and then click Finish. In the Data Source task pane, expand the dataFields group, and then drag a field or group into the current view. Add a second data connection to use the same Web service that you used in step 3. To do this, follow these steps: On the Tools menu, click Data Connections. In the Data Connections dialog box, click Add. In the Data Connection Wizard, click Receive data, and then click Next. On the next wizard page, click Web service, and then click Next. Type the location of the Web service that you used in step 3, and then click Next. Select the same operation that you selected in step 3e, and then click Next. Follow the instructions to complete the wizard. In the Data Connections dialog box, click Close. In the Data Source task pane, under Data Source, select the secondary data source that you created in step 5. Under dataFields, drag the field or group that you worked with in step 4 into the current view. On the Standard toolbar, click Preview Form, and then click Run Query. Notice that the controls display the same data. Click Close Preview. On the Tools menu, click Data Connections. Select the primary data source, and then click Modify. 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.
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.
Article ID: 891161 - Last Review: May 2, 2007 - Revision: 2.1
APPLIES TO Microsoft Office InfoPath 2007 Microsoft Office InfoPath 2003 Microsoft Office InfoPath 2003, Service Pack 1 (SP1)
kbdesign kbtshoot kbprb KB891161
Contact us for more help
Connect with Answer Desk for expert help.