IT Community - Software Programming, Web Development and Technical Support

# What is the role of the DataReader class in ADO.NET connections?

This is a discussion on # What is the role of the DataReader class in ADO.NET connections? within the VB.NET Programming forums, part of the Software Development category; What is the role of the DataReader class in ADO.NET connections?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > VB.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-26-2007, 05:48 AM
anbuchezhians anbuchezhians is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 77
anbuchezhians is on a distinguished road
Question # What is the role of the DataReader class in ADO.NET connections?

What is the role of the DataReader class in ADO.NET connections?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-27-2007, 02:44 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: # What is the role of the DataReader class in ADO.NET connections?

Basic role of Datareader has been provided below....


DataReader returns read-only, forward-only rowset from the data source.
A DataReader provides fast access when a forward-only sequential read is needed.

DataReader classes are connected to their data sources. Consequently, there is no generic DataReader class. Rather, each managed provider exposes its own DataReader class, which implements the System.Data.IDataReader interface. The SQL Server managed provider exposes the SqlDataReader class (in the System.Data.SqlClient namespace). DataReader classes provide sequential, forward-only, read-only access to data. Because they are optimized for this task, they are faster than the DataSet class.


Example

OleDBConnection myConnection =
new OleDBConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ;" +
@"Data Source=C:\Test.MDB");

// open connection
myConnection.Open();
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create connections between your ColdFusion Web sites and databases? vigneshgets ColdFusion Programming 2 10-01-2008 10:23 PM
How to Implementing Role Based Security in ASP.NET S.Vinothkumar C# Programming 13 04-02-2008 04:53 AM
Can any one explain about the Persistent Database Connections in php? Falcon PHP Programming 4 11-12-2007 11:56 PM
Can we connect two datareader to same data source using single connection at same tim mobilegeek C# Programming 1 07-23-2007 06:04 AM
What's the role of documentation in QA? devarajan.v Software Testing 1 07-17-2007 08:16 AM


All times are GMT -7. The time now is 12:13 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0