Explain what a diffgram is and its usage ?

Answers were Sorted based on User's Feedback



Explain what a diffgram is and its usage ?..

Answer / swapna

A DiffGram is an XML format that is used to identify
current and original versions of data elements. The DataSet
uses the DiffGram format to load and persist its contents,
and to serialize its contents for transport across a
network connection. When a DataSet is written as a
DiffGram, it populates the DiffGram with all the necessary
information to accurately recreate the contents, though not
the schema, of the DataSet, including column values from
both the Original and Current row versions, row error
information, and row order.
When sending and retrieving a DataSet from an XML Web
service, the DiffGram format is implicitly used.
Additionally, when loading the contents of a DataSet from
XML using the ReadXml method, or when writing the contents
of a DataSet in XML using the WriteXml method, you can
select that the contents be read or written as a DiffGram.
The DiffGram format is divided into three sections: the
current data, the original (or "before") data, and an
errors section, as shown in the following example.
<?xml version="1.0"?>
<diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-
diffgram-v1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DataInstance>
</DataInstance>
<diffgr:before>
</diffgr:before>
<diffgr:errors>
</diffgr:errors>
</diffgr:diffgram>
The DiffGram format consists of the following blocks of
data:
<DataInstance>
The name of this element, DataInstance, is used for
explanation purposes in this documentation. A DataInstance
element represents a DataSet or a row of a DataTable.
Instead of DataInstance, the element would contain the name
of the DataSet or DataTable. This block of the DiffGram
format contains the current data, whether it has been
modified or not. An element, or row, that has been modified
is identified with the diffgr:hasChanges annotation.
<diffgr:before>
This block of the DiffGram format contains the original
version of a row. Elements in this block are matched to
elements in the DataInstance block using the diffgr:id
annotation.
<diffgr:errors>
This block of the DiffGram format contains error
information for a particular row in the DataInstance block.
Elements in this block are matched to elements in the
DataInstance block using the diffgr:id annotation.

Is This Answer Correct ?    5 Yes 0 No

Explain what a diffgram is and its usage ?..

Answer / 1647264

A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.

When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram.

The DiffGram format is divided into three sections: the current data, the original (or "before") data, and an errors section, as shown in the following example.

<?xml version="1.0"?>

<diffgr:diffgram

xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"

xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<DataInstance>

</DataInstance>

<diffgr:before>

</diffgr:before>

<diffgr:errors>

</diffgr:errors>

</diffgr:diffgram>

The DiffGram format consists of the following blocks of data:

<DataInstance>

The name of this element, DataInstance, is used for explanation purposes in this documentation. A DataInstance element represents a DataSet or a row of a DataTable. Instead of DataInstance, the element would contain the name of the DataSet or DataTable. This block of the DiffGram format contains the current data, whether it has been modified or not. An element, or row, that has been modified is identified with the diffgr:hasChanges annotation.

<diffgr:before>

This block of the DiffGram format contains the original version of a row. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation.

<diffgr:errors>

This block of the DiffGram format contains error information for a particular row in the DataInstance block. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What is difference between sqldatareader and sqldataadapter?

0 Answers  


What are the differences between RAW, AUTO and Explicit modes in retrieving data from SQL Server in XML format?

1 Answers   TCS,


Explain the various objects in dataset.

0 Answers  


What is sqlconnection and sqlcommand?

0 Answers  


Which type of database is used while processing dynamic database?

1 Answers   Microsoft,






What are the rules to implement connection pooling?

0 Answers  


We all know that Dataset is purely disconnected architechure, but we also know that we can update the changes made to the dataset can be updated in the backend database. when there is no connection how does the update happedn?

6 Answers   Accenture, FastStream,


What is meant by ‘transaction’ in a database and what are the ‘properties of transaction’?

0 Answers  


What is the difference in an abstract class and an interface?

0 Answers  


What are the key features of ado.net?

0 Answers  


What is difference between entity framework and ado.net?

0 Answers  


Is ado.net an orm?

0 Answers  


Categories