Is DataSet just an xsd file?

Nov 17 2004 8:31 AM
I noticed, when using dataform wizard to update a table, that it doesn't instantiate a DataSet like new DataSet(), but instead creates an xsd file and instantiates this one. I thought the xsd file contains only the schema. Here is tha code that VS .NET generates to fill a datagrid with a dataset called ds in a program DataGridTest. Pay attention to this: DataGridTest.ds objDataSetTemp; objDataSetTemp = new DataGridTest.ds(); ds is the ds.xsd file that generates public void LoadDataSet() { // Create a new dataset to hold the records returned from the call to FillDataSet. // A temporary dataset is used because filling the existing dataset would // require the databindings to be rebound. DataGridTest.ds objDataSetTemp; objDataSetTemp = new DataGridTest.ds(); try { // Attempt to fill the temporary dataset. this.FillDataSet(objDataSetTemp); } catch (System.Exception eFillDataSet) { // Add your error handling code here. throw eFillDataSet; } try { grdOrder_Details.DataSource = null; // Empty the old records from the dataset. objds.Clear(); // Merge the records into the main dataset. objds.Merge(objDataSetTemp); grdOrder_Details.SetDataBinding(objds, "Order Details"); }