Export (0) Print
Expand All

WebServiceConnection.GenerateDataSetDiffGram Method

Office 2010

For a data connection that uses an ADO .NET DataSet and returns a DiffGram that identifies any differences between original and current versions of data elements.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

public abstract XPathNavigator GenerateDataSetDiffGram()

Return Value

Type: System.Xml.XPath.XPathNavigator
An XPathNavigator positioned at the root of an XML node that contains the DiffGram for the data returned by the data connection.

A DiffGram is an XML format that identifies current and original versions of data elements. If the data source represented by the WebServiceConnection object returns an ADO.NET DataSet, calling the GenerateDataSetDiffgram method on the connection will generate a DiffGram from the data source of the connection that identifies any differences between the original set of data elements in the form and those that are currently available from the data connection.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed from code running in forms opened in Microsoft InfoPath Filler or in a Web browser.

In the following example, the GenerateDataSetDiffGram method of the WebServiceConnection class is called on a Web service connection that uses a DataSet to return a DiffGram to the XPathNavigator object named DiffGramNavigator.

// Open connection.
WebServiceConnection wsc = 
   (WebServiceConnection)this.DataConnections["Main query"];

// Generate DiffGram.
XPathNavigator DiffGramNavigator =  wsc.GenerateDataSetDiffgram();
Show:
© 2014 Microsoft