11.6. Summary

 < Day Day Up > 

ADO.NET supports two database connectivity models: connected and disconnected. The connected model remains connected to the underlying database while traversing a resultset in a forward-only read-only manner; the disconnected model can retrieve a resultset into an in-memory cache and disconnect itself from the source data. Two distinctly separate data storage objects are available for implementing these models: the DataReader and the DataSet. The DataReader serves up data a row at a time; the DataSet functions as an in-memory relational database. Changes to the contents of the DataSet can be posted back to the original data source using the DataAdapter object. This object includes properties and methods designed to address synchronization issues that arise when disconnected data is used to update a database.

Although XML classes are not part of the ADO.NET namespaces, a level of interaction between relational and XML data is provided through the ADO.NET DataSet class. This class includes WriteXmlSchema and WriteXml methods that are used to create an XML schema and document. The versatile DataSet.ReadXml method has several overloads that are used to construct a DataSet from an XML data file or schema.

     < Day Day Up > 

    Core C# and  .NET
    Core C# and .NET
    ISBN: 131472275
    EAN: N/A
    Year: 2005
    Pages: 219

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net