October 2010
Intermediate to advanced
1920 pages
73h 55m
English
DataAdapter ObjectThe DataAdapter acts as the bridge between an in-memory database table and a physical database table. You use the DataAdapter to retrieve data from a database and populate a DataTable. You also use a DataAdapter to push changes that you have made to a DataTable back to the physical database.
The component in Listing 19.25 illustrates how you can use a SqlDataAdapter to populate a DataTable.
Listing 19.25. App_Code\Movie8.cs

The page in Listing 19.26 contains a GridView that is bound to an ObjectDataSource that represents the component in Listing 19.25 (see Figure 19.12).
Figure 19.12. Displaying data with a DataAdapter ...