Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 28th, 2005, 11:02 AM
Registered User
 
Join Date: Mar 2005
Location: jaipur, rajasthan, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Fill data set from data reader

Can we fill data set from data reader
If yes then how?

Reply With Quote
  #2 (permalink)  
Old March 28th, 2005, 11:13 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

well,we can,

but DataSet and DataReader are two complete different objects

however a data source should accept both of them

and how.

_____________
Mehdi.
software student.
Reply With Quote
  #3 (permalink)  
Old March 29th, 2005, 02:46 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You wont find any direct methods to fill dataset using datareader.
You can loop through the records and you can manually create rows ,table,columns and set the value of the record to the rows.

Reply With Quote
  #4 (permalink)  
Old March 29th, 2005, 07:08 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

in ADO.NET 2 DataTable would have a method,

DataTable.Load(DataReader);

but in ADO.NET 1.1

look into MSDN,in DbDataAdapter class its Fill method has something interesting,
Code:
[C#]
protected virtual int Fill(DataTable, IDataReader);
you can derive your own adapter from DbDataAdaptor and use that method.

_____________
Mehdi.
software student.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill the five record only adapter to data set bhasker_braj121 ADO.NET 0 July 16th, 2007 05:12 AM
Getting data from a data reader Snuffles ASP.NET 2.0 Basics 3 March 30th, 2007 09:16 AM
Data reader checking.... janees ASP.NET 1.0 and 1.1 Professional 1 March 11th, 2007 06:09 AM
oracle data reader silvia C# 10 February 2nd, 2006 07:30 AM



All times are GMT -4. The time now is 05:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.