< Day Day Up > |
Topics in This Chapter
ADO.NET is based on a flexible set of classes that allow data to be accessed from within the managed environment of .NET. These classes are used to access a variety of data sources including relational databases, XML files, spreadsheets, and text files. Data access is through an API, known as a managed data provider. This provider may be written specifically for a database, or may be a more generic provider such as OLE DB or ODBC (Open DataBase Connectivity). Provider classes expose a connection object that binds an application to a data source, and a command object that supports the use of standard SQL commands to fetch, add, update, or delete data. ADO.NET supports two broad models for accessing data: disconnected and connected. The disconnected model downloads data to a client's machine where it is encapsulated as an in-memory DataSet that can be accessed like a local relational database. The connected model relies on record-by-record access that requires an open and sustained connection to the data source. Recognizing the most appropriate model to use in an application is at the heart of understanding ADO.NET. This chapter examines both models offering code examples that demonstrate the classes used to implement each. |
< Day Day Up > |