|
|
XML and DataSetsA DataSet stores data that is obtained from a data source.The datasource can be classified as two. Dataset also can also be classified as Typed Dataset-A typed dataset is derived from a dataset class and has an associated XML Schema. The XML Schema contains all the information about tables,constraints,and relations that will need to validate an XML document.All these information is stored in the XSD (SML Schema Definition) file. Role of .Net Framework …. The .Net Framework uses XSD to generate Data for Dataset. XML – DATASET Methods GetXML - Enables you to retrieve the XML representation of the data stored in a dataset in to a string Role of ADO.Net …. ADO.Net is used to transfer data between XML files and Dataset. Write XML data from a DataSetVisual Basic .NET Dim con as new SqlConnection(“server={servername};database={dbname};uid={user};pwd={password}”) Visual C# SqlConnection con=new SqlConnection(“server={servername};database={dbname};uid={user};pwd={passwrd}”); Dt.WriteXML(“Items.xml”, XmlWriteMode.WriteSchema);
Sample Code : Validate a User using XML and ASP.Net |

