WebServiceConnection.GenerateDataSetDiffGram Method
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)
Syntax
'Declaration
Public MustOverride Function GenerateDataSetDiffGram As XPathNavigator
'Usage
Dim instance As WebServiceConnection
Dim returnValue As XPathNavigator
returnValue = instance.GenerateDataSetDiffGram()
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.
Remarks
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.
Examples
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();
' Open connection.
Dim wsc As WebServiceConnection =
DirectCast(Me.DataConnections("Main query"), WebServiceConnection)
' Generate DiffGram.
Dim DiffGramNavigator As XPathNavigator = _
wsc.GenerateDataSetDiffgram()