|
|
 |
| 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.
|
 |

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
|
|
Fill data set from data reader
Can we fill data set from data reader
If yes then how?
__________________
Sunil
|

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
|
|
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.
|

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
|
|
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.
|

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
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |