473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

DataSet versus DataReader. Which one to use? Thank You.

Hello,

I want to retrive N records from a database (I am using SQL and Access
in 2 different projects):

id class text
1 book book comments
2 paper paper comments
....

I will filter records according to "class" field values.
I will allways get ONLY 2 to 4 records which [text] field I will display
in different places of my page.

Should I use a dataset or a datareader?
I read somewhere that for such cases a datareader is better but I am not
sure. What do you think?

Thank You,
Miguel

Nov 19 '05 #1
2 984
For a scenario as simple as you describe, a DataReader would be the most
efficient solution.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:e4**************@TK2MSFTNGP14.phx.gbl...
Hello,

I want to retrive N records from a database (I am using SQL and Access in
2 different projects):

id class text
1 book book comments
2 paper paper comments
...

I will filter records according to "class" field values.
I will allways get ONLY 2 to 4 records which [text] field I will display
in different places of my page.

Should I use a dataset or a datareader?
I read somewhere that for such cases a datareader is better but I am not
sure. What do you think?

Thank You,
Miguel

Nov 19 '05 #2
Thanks Steve.

Cheers,
Miguel

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:St***@Orr.net:
For a scenario as simple as you describe, a DataReader would be the most
efficient solution.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:e4**************@TK2MSFTNGP14.phx.gbl...
Hello,

I want to retrive N records from a database (I am using SQL and Access in
2 different projects):

id class text
1 book book comments
2 paper paper comments
...

I will filter records according to "class" field values.
I will allways get ONLY 2 to 4 records which [text] field I will display
in different places of my page.

Should I use a dataset or a datareader?
I read somewhere that for such cases a datareader is better but I am not
sure. What do you think?

Thank You,
Miguel


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rob via .NET 247 | last post by:
Ok, I'm new to .NET so I'm afraid I'm doing something stupidhere, but I'm trying to populate a DataSet manually from aDataReader, and its turning out to be ridiculously difficult. Yes, I could use...
6
by: nabil m | last post by:
hi , i have been looking around on msdn and google but i still have a couple of oquestions about the difference between a datareader and a dataset - which to use when - 1) do i have to choose...
2
by: Sumaira Ahmad | last post by:
Hi All My Web Service is returning a DataSet. I realized that we cannot return a DataReader.. Normally we can use a DataReader( when not using Web services) and access it as below to assign...
14
by: Bihn | last post by:
I was reading about datareader which is said to be slimmer & faster then dataset. Since the datareader have to go fetching the dat from the database every time it need it, the data it gets then...
4
by: Shapper | last post by:
Hello, I have a XML file that includes the node <item>: .... <title>...</title> <url>...</url> <item> <title>title 01</title> <description>description 01</description> </item>
2
by: Patreek | last post by:
Hi, I'm writing my first real asp.net app at my job, and I'd like opinions please. In my classic ASP apps that I've written, I'd often have separate files for retreiving data and returning the...
1
by: Ivan Weiss | last post by:
Hey all, I have the following code to populate a ListView control from my Access database. The listview is displaying a list of saved projects that the user will be able to open, edit, or delete...
7
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have read some articles state that DataSet should NOT be used for large resultset. What does "large" mean? Is "large" based on # of rows/columns and/or memory required to hold the original and...
2
by: phanimadhav | last post by:
Hello experts, I have small query in ado.net.When we are using Dataset and when we are using Datareader.Actually these two are using getting the values from database.But which...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.