asp.net.ph

DataSet.Prefix Property

System.Data Namespace   DataSet Class


Sets or retrieves an XML prefix that aliases the namespace of the DataSet.

Syntax


Script DataSet.Prefix [ = strPrefix ]

Property Value


strPrefix String specifying the XML prefix for a DataSet namespace.

The property is read/write with no default value.

Remarks

The Prefix is used throughout an XML document to identify elements which belong to the DataSet object's namespace ( as set by the Namespace property ).

Example

The following example sets the Prefix before calling the ReadXml method.

private void ReadData ( DataSet thisDataSet ) {
   thisDataSet.Namespace = "CorporationA";
   thisDataSet.Prefix = "DivisionA";
   // read schema and data.
   string filename = "CorporationA_Schema.xml";
   thisDataSet.ReadXmlSchema ( filename );
   filename = "DivisionA_Report.xml";
   thisDataSet.ReadXml ( filename );
}
  C# VB

See Also

DataSet Members   Namespace Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph