The dataset class
-
[ Team LiB ] Recipe 8.2 Saving and Loading a DataSet from XML Problem You need to save a DataSet as an XML file and create a DataSet from an XML file. Solution Use the XmlTextWriter and XmlTextReader classes. The sample code contains three event handlers
11p luvpro 04-08-2010 100 13 Download
-
[ Team LiB ] Recipe 8.10 Filling a DataSet Using an XML Template Query Problem You have an XML template query that you need to use from ADO.NET. You need to fill a DataSet using an XML template query. Solution Use an XML template query to fill a DataSet using the SQLXML Managed Classes.
8p luvpro 04-08-2010 104 11 Download
-
[ Team LiB ] Recipe 2.18 Controlling the Names Used in a Strongly Typed DataSet Problem You want to assign your own names to the classes and properties for strongly typed DataSet classes. Solution Use annotations in the XML schema to control the names of classes and properties in strongly typed DataSet classes. The sample uses one XSD file: CategoriesDS_AnnotatedNa
5p luvpro 04-08-2010 90 7 Download
-
The SqlDataAdapter Class You use an object of the SqlDataAdapter class to synchronize data stored in a DataSet object with a SQL Server database
6p daisuphu 29-07-2010 108 10 Download
-
The DataViewManager Class A DataViewManager allows you to centrally manage multiple DataView objects in a DataSet. A DataViewManager also allows you to create DataView objects on the fly at runtime
1p daisuphu 29-07-2010 81 10 Download
-
The DataTable Class You use an object of the DataTable class to represent a table. You can also store multiple DataTable objects in a DataSet. Table 11.1 shows some of the DataTable properties.
3p daisuphu 29-07-2010 78 9 Download
-
The output from this program is as follows: numberOfRows = 3 Reading from the Products DataTable ProductID = 1 ProductName = Chai UnitPrice = 18 ProductID
9p daisuphu 29-07-2010 93 8 Download
-
Note The Fill() method will actually open and close the Connection for you if you don't open it first, however, it is better to explicitly open and close the Connection because that way it is clearer what your program is doing.
12p daisuphu 29-07-2010 78 11 Download
-
The DataSet Class You use an object of the DataSet class to represent a local copy of the information stored in the database.
6p daisuphu 29-07-2010 75 9 Download
-
Reading a Column Value Using Strongly Typed DataSet Classes A strongly typed DataSet object allows you read a column value using a property with the same name as the column.
7p daisuphu 29-07-2010 76 5 Download
-
Modifying Data Using a Strongly Typed DataSet In Chapter 10, you saw how to create and use a strongly typed DataSet class named MyDataSet. You can use objects of this class to represent the Customers table and rows from that table
3p daisuphu 29-07-2010 93 7 Download