What are the components of ADO.NET?
The main components of ADO.NET are:
- Connection: Represents the connection to a data source (e.g., SQL Server, Oracle).
- Example: SqlConnection, OleDbConnection, OracleConnection.
Follow:
- Command: Represents a SQL query or stored procedure to be executed against the
data source.
- Example: SqlCommand, OleDbCommand.
- DataReader: Provides a forward-only, read-only cursor for retrieving data from the
database.
- Example: SqlDataReader.
- DataSet: Represents an in-memory cache of data, which can hold multiple
DataTables and relationships.
- Example: DataSet.
- DataAdapter: Acts as a bridge between a DataSet and a data source. It fills a
DataSet or updates a data source.
- Example: SqlDataAdapter.