Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2005, 11:02 AM
Registered User
 
Join Date: Mar 2005
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?

 
Old March 28th, 2005, 11:13 AM
Friend of Wrox
 
Join Date: Jul 2004
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.
 
Old March 29th, 2005, 02:46 AM
Friend of Wrox
 
Join Date: Oct 2003
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.

 
Old March 29th, 2005, 07:08 AM
Friend of Wrox
 
Join Date: Jul 2004
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.





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.