C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







ado.net brief notes


Posted Date: 22 May 2008    Resource Type: Articles    Category: General

Posted By: subramanyam       Member Level: Silver
Rating:     Points: 10



ADO.NET

ADO.net supports two methods
1. Connected model
2. Disconnected model
In the case of disconnected model the connection between the application and database is not required.
In the case of connected model the connection is established between the application and database.

Disconnected model architecture

Connection--?data adapter--?dataset--?dataview-?user interface
Connected oriented model
Connection-?command--? data reader-?user interface

Methods of data adaptor:

Fill: It is used to read the data from the database on the select statement of of the select command and used to fill the retrieved data into dataset.
Update: it is used to read the data from the da members of the dataset and is used to update the data base with that data.
Dataset : it is inset memory representation of the data at the client system in the format of XML.
Note: if a relation is established between the data members of the dataset then it is said to data relation.
If any manipulation occurred then it reflect the database.
It is of 2 types
Typed and un typed

Whenever the dataset is defined based on th XML schema definition(XSD) file then it is said to be typed data set
Without using XSD known as un typed data set.

Data view
It is a logical representation of the data present at the data member of data set.
Command
It is used to provide source for the connection object.
Methods of COMMAND:
Execute scalar : used to execute a select statement which returns a single column and single row.
Return type is OBJECT
Execute reader(): used to execute any valid select statement
Return type INTEGER.
Execute non query(): used to execute any valid statement other than the select statement.
Data reader : it is read only and forward only record set which is used to maintain the records retrieved by the command objects

Syntax opening connection to database :

sqlconnection cn=new sqlconnection(“datasource= ;database= ;userid= ;pwd=”);
sqldataadaptor da= new sqldataadaptor(“query “ cn);
sqlcommandbuilder cmd=new sqlcommandbuilder(da);
dataset ds=new dataset();





Responses

Author: ranipriya    02 Jun 2008Member Level: Gold   Points : 0
good ...


Author: ranipriya    02 Jun 2008Member Level: Gold   Points : 0
good ...


Author: Sonu Fernandes    02 Jun 2008Member Level: Gold   Points : 0
nice notes for freshers.


Author: Debasmit Samal    03 Jun 2008Member Level: Gold   Points : 0
Really helpful for reminding overally


Author: UltimateRengan    03 Jun 2008Member Level: Diamond   Points : 0
good one


Feedbacks      
Popular Tags   What are tags ?   Search 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: Understanding Interface
Previous Resource: Benefits of using MOSS 2007
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

budget conference call

Contact Us    Privacy Policy    Terms Of Use