p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > Other .NET > ADO.NET
I forgot my password Register Now
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 28th, 2005, 11:02 AM
Registered User
Points: 39, Level: 1
Points: 39, Level: 1 Points: 39, Level: 1 Points: 39, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?

__________________
Sunil
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old March 28th, 2005, 11:13 AM
Friend of Wrox
Points: 1,351, Level: 14
Points: 1,351, Level: 14 Points: 1,351, Level: 14 Points: 1,351, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old March 29th, 2005, 02:46 AM
Friend of Wrox
Points: 657, Level: 9
Points: 657, Level: 9 Points: 657, Level: 9 Points: 657, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old March 29th, 2005, 07:08 AM
Friend of Wrox
Points: 1,351, Level: 14
Points: 1,351, Level: 14 Points: 1,351, Level: 14 Points: 1,351, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

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

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 06:12 AM
Getting data from a data reader Snuffles ASP.NET 2.0 Basics 3 March 30th, 2007 10:16 AM
Data reader checking.... janees ASP.NET 1.0 and 1.1 Professional 1 March 11th, 2007 07:09 AM
oracle data reader silvia C# 10 February 2nd, 2006 07:30 AM
extracting a value from a data reader Morrislgn ASP.NET 1.1 6 February 27th, 2004 02:02 PM



All times are GMT -4. The time now is 03:13 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc