Home arrow ADO.NET arrow Page 5 - All You Need To Know About ADO.NET: Part 2/2
ADO.NET

All You Need To Know About ADO.NET: Part 2/2


In this, the final part of her two part series on ADO.NET, Vaijayantee talks about the purpose of ADO.NET, scalability, XML, the ADOCommand and SQLCommand objects and more. If you're just new to .NET then Vaijayantee's ADO.NET tutorial series will have you up and running with databases in a short time.

Author Info:
By: Vaijayantee Sateesh Kamat
Rating: 4 stars4 stars4 stars4 stars4 stars / 53
April 15, 2002
TABLE OF CONTENTS:
  1. · All You Need To Know About ADO.NET: Part 2/2
  2. · ADO.NET's Disconnected Architecture
  3. · Building An In-Memory Schema
  4. · DataRelation Objects and Constraints
  5. · Examining the XSD
  6. · Conclusion

print this article
SEARCH DEVARTICLES

All You Need To Know About ADO.NET: Part 2/2 - Examining the XSD
(Page 5 of 6 )

As we have seen, the DataSet generated is saved as an .xsd file. If we open the xsd file in a text editor, we see the following HTML like tags, Though we need not know the XML in depth, the marked portion can easily tell us the details about our table name, column names and Key:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="DsXML" targetNamespace="http://tempuri.org/DsXML.xsd" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns="http://tempuri.org/DsXML.xsd" xmlns:mstns="http://tempuri.org/DsXML.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="DsXML" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="MyTable">
<xs:complexType>
<xs:sequence></xs:sequence>
<xs:attribute name="LastName" type="xs:string" />
<xs:attribute name="FirstName" type="xs:string" />
<xs:attribute name="MyID" type="xs:long" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:key name="DsXMLKey1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:MyTable" />
<xs:field xpath="@mstns:MyID" />
</xs:key>
</xs:element>
</xs:schema>


Passing Datasets
AS ADO.NET uses XML as its default format, passing the DataSet between two applications or two components becomes very easy. To transmit an ADO RecordSet, COM marshalling has to be used while ADO.NET uses an XML stream. In general, we can say that the following are the benefits of using XML as a native data format over COM marshalling.

XML as the Native Language
COM marshalling supports only a limited set of data types whereas there's no such restriction in XML format.

AS XML does not require data type conversion, it gives a distinct performance advantage over ADO, which requires data type conversion.

Firewalls are created to let HTML text pass, but to stop any system level requests from accessing the server. As XML is a text based protocol, it is able to pass through firewalls.
blog comments powered by Disqus
ADO.NET ARTICLES

- Datasets in Microsoft.Net
- Latest Developments in the .Net World
- Introduction to .NET
- Automatic Generation of Single Table SQL Sta...
- Data Access in .NET using C#: Part 1
- All You Need To Know About ADO.NET: Part 2/2
- All You Need To Know About ADO.NET: Part 1/2
- Easing Transition From ASP and ADO to ASP.NE...
- A Practical Comparison of ADO and ADO.NET

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials