The caching Application Block and cryptography Application Block in Enterprise Library 2.0 are described earlier today, so let's take a look at the Enterprise Library 2.0 part of the data processing--data Access Application Block. It provides our developers with most of the common methods for data processing. Its contents include:
1. Use DataReader to return multiple rows of data
2. Use dataset to return multiple rows of data
3. Return a parameter of output type
4. Returns a single value
5. Transaction processing
6. Return XML data
7, using the dataset to modify the database
8, Enterprise Library 2.0--Data Access Application Block (supplemental)
...
It seems that dataaccess application block is like ado.net, indeed, DataAccess application block is not a substitute for ado.net, it is a supplement to ado.net. The advantage of DataAccess application Block is that it can use the same code to access different types of databases, such as when our application goes from SQL Server to Oracle, then use DataAccess application Block allows you to do this without having to modify any code, but the configuration file is certainly modified. Of course, it is not under any circumstances to use the DataAccess application block, for example, when our code is for a very special database to write words, this time should choose Ado.net.
First let's take a look at how DataAccess Application Block is configured (for example, SQL Server 2000).
First open the Configuration tool provided by the Enterprise Library, select File-->open application, and select the Web.config or app.config file for our project: