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 » ASP.NET/Web Applications »

Introduction to ADO.NET


Posted Date: 21 May 2004    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: chandrakant SarodeMember Level: Bronze    
Rating: 1 out of 5Points: 7



I am going to give you an article on ADO.NET. Before that we are all very much familiar with ADO and we enjoyed with this component for the use of accessing the data form the any database using OLEDB Provider .The ADO has all compatibility with Past technology even through the Microsoft has introduced new technology by name ADO.NET why?

ADO.NET is not a replacement of ADO it has been developed with enhancement with ADO because we can create powerful and scalable web application and one more important is working with data in a disconnected way under the .NET Framework Stateless distributed web modal.

What is stateless? The answer is when we are working with web service that allows data to flow In and Out using XML and HTTP this service is stateless and uses store procedure to get the data IN and OUT of database the HTTP protocol is called as stateless protocol.

Introduction of ADO.NET

Microsoft have committed this is Stateless Data Model because it works very well for web - style application and provide full support for disconnected data access. Form this you access the data form the most of time when you are working under not connected to data source

Namespace used by ADO.NET

1. System.Data
2. System.Data.ADO
3. System.Data.SQL
4. System.Data.XML
5. Syatem.Data.SQLTypes.

1. System. Data

This Namespace mainly consists of classes that constitute the ADO.NET Architecture. Which allow you to build component that manages data efficiently form multiple data sources.ADO.NET provides the tools to Request, Update & Reconcile data in n-Tier systems in a disconnected scenario, The ADO.NET Architecture can also be used in client application such as HTML Pages created by ASP.NET or Windows Forms

2. System.Data.ADO

This Namespace contains the ADO.NET managed provider. i.e. Managed By OLEDB data store Objects

3. System.Data.SQL

This Namespace contains the SQL Server managed Provider it contains SQL Server specific implementations of ADO+ objects

4. System.Data.XML

It contain XML Objects

5. System.Data.SQLTypes

It contains SQL Data Types.

How open the Database Connection using System.Data.SQL Namespace.

Example


< % Import Namespace = “System. Data” % >

< % Import Namespace = “System. Data.SQL” % >

< html >
<head> <title> < Database Connection Example > </title> <head>

< Script Language = “C#”, runat = “Server” >

SQLConnection Cn;

Void GetConnect (Objects Src , EventArgs E)

{
Cn = New SQLConnection ( “Sever = localhost ; uid=sa; pwd = ; database=master”);

Cn.Open ( );

}

< / Script >

< Body >

< form runat = “Server “ >

< h3 > Now Get Connected with Master Database < /h3 >

< asp : button Onclick = “GetConnect” text = “Connected Master Database” runat
=”Server”/>

< / form >

< / body >

< / html >



I hope you will enjoy this artical fell free to give feedback.
Next session i will give classes used in System.Data.ADO AND System.Data.SQL



Responses

Author: kandadais    01 Jun 2004Member Level: Bronze   Points : 0
hello this is my first look at your site. i was searching for ado.net i happen to come across this site. the site is good for the beginners. the article i read "Introduction to ADO.NET" is ok.It would better if small spelling mistakes are avoided. I think i would be a regular vistor of this site.



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: How to set the Top and left property of a web control dynamically?
Previous Resource: Bind The Data with Repeater Conrol
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use