Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

Steps to reproduce the behavior

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

    Notice that the controls display the same data.
  10. Click Close Preview. On the Tools menu, click Data Connections.
  11. Select the primary data source, and then click Modify.
  12. 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.
  13. 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.

↑ Back to the top


Keywords: KB891161, kbprb, kbtshoot, kbdesign

↑ Back to the top

Article Info
Article ID : 891161
Revision : 3
Created on : 5/2/2007
Published on : 5/2/2007
Exists online : False
Views : 474