What is the purpose of msdata: Ordinal in XSD?

I am considering several XSD files that use msdata: Ordinal for elements in a sequence. It seems that I can not find anywhere that it is used and / or in what circumstances it will be needed. Can someone help me with an explanation and an example?

+4
source share
1 answer

I was wondering the same thing. * .xsd created by xsd.exe or using DataSet.WriteXmlSchema have this attribute as defined in msdata.xsd in your <VS folder>\Microsoft Visual Studio *\Xml\Schemas :

 ... <xs:attribute name="Ordinal" type="xs:integer"> </xs:attribute> ... 

The attribute is used to determine the ordinal position of a column, which is useful for mapping an xsd schema to a DataSet . See Getting a Relational DataSet from an XML Schema (XSD) , Using XML in a DataSet

This article briefly talked about this:

An additional attribute named Ordinal has been created. As always, this is part of the msdata space with a value of 0 for the first column and 1 for the second column. This is due to the fact that each column is assigned a number starting at zero, and then gradually increasing it by one.

+2
source

All Articles