C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Using Data Access Application Block - I


Posted Date: 09 Jun 2004    Resource Type: Articles    Category: .NET Framework
Author: Lokanathan Member Level: Bronze    
Rating: 1 out of 5Points: 7



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.




Responses

Author: P.S.D Achyut Babu    29 Jul 2004Member Level: Bronze   Points : 0
When are u going to release the second part


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: What is a Assembly and Whats the difference between private and shared assemblies
Previous Resource: Specifying the Base Type of an Enumeration in C#
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use