Share via


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
'Usage

Return Value

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 Office InfoPath 2007 or in a Web browser.

Example

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()

See Also

Reference

WebServiceConnection Class
WebServiceConnection Members
Microsoft.Office.InfoPath Namespace