Using Data Access Application Block - I
Microsoft patterns & practices
Patterns & practices provide proven architectures, production quality code, and lifecycle best practices. Patterns & Practices team has provided Code/Blocks to be used in our applications. Some of them are a. Data Access Application Block for .NET b. Caching Application Block for .NET c. Exception Management Application Block for .NET d. Logging Application Block
To know more visit http://www.microsoft.com/resources/practices/code.mspx
What is Data Access Application Block?
The Microsoft Data Access Application Block for .NET consists of a single .NET-based assembly, which contains all of the functionality necessary to perform the most common data access tasks against a Microsoft SQL Server 2000 database. Specifically, the Data Access Application Block helps you: ? Call stored procedures or SQL text commands. ? Specify parameter details. ? Return SqlDataReader, DataSet, XmlReader objects, or single values. ? Use strongly typed table and field names. ? Support parameter caching, where required. ? Allow additional tables to be added by passing in pre-existing datasets. ? Update a dataset with user-specified update commands. ? Create SqlCommand objects. ? Allow strongly typed data rows to be passed in place of parameters.
Where I can get Data Access Application Block?
You can download “Data Access Application Block” from Microsoft website.
http://www.microsoft.com/downloads/details.aspx?FamilyId=F63D1F0A-9877-4A7B-88EC-0426B48DF275&displaylang=en
To know more about Data Access Application Block visit http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp
How to Use Data Access Application Block
Step 1: Install Data Access Application Block Step 2: Add reference to Data Access Application Block dll to your application. Step 3: Use the methods of the Data Access Application Block for the Sql calls.
Referencing the Data Access Application Block in a Visual C# .NET Project
When you create a data access client that uses the Data Access Application Block, you should perform the following steps: 1. Set a reference to the Data Access Application Block assembly Microsoft.ApplicationBlocks.Data.dll. 2. Add a using statement at the top of your data access client source file(s) to reference the Microsoft.ApplicationBlocks.Data namespace. All Data Access Application Block types are located within this namespace. 3. Add a using statement to reference the System.Data and System.Data.SqlClient namespaces. The SqlHelper methods use various types from these namespaces as input and return parameters. 4. Optionally, add a using statement to reference the System.Xml namespace. This is required only if you use the SqlHelper ExecuteXmlReader methods.
I have introduced the Data Access Application Block. In next article I will describe the Block in detail with a sample code.
|
| Author: P.S.D Achyut Babu 29 Jul 2004 | Member Level: Bronze Points : 0 |
When are u going to release the second part
|