Microsoft Knowledge Base Email Alertz

(891161) - Discusses a problem that occurs when two or more data connections use the same Web service, and then you change one of the data connections to use a Web service from a different namespace. The data connections are no longer valid.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 891161 - Last Review: May 2, 2007 - Revision: 2.1

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

On This Page

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 "Applies to" section.

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.

APPLIES TO
  • Microsoft Office InfoPath 2007
  • Microsoft Office InfoPath 2003
  • Microsoft Office InfoPath 2003, Service Pack 1 (SP1)
Keywords: 
kbdesign kbtshoot kbprb KB891161
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate