473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datareader vs Tableadaptor question

Hi, I currently display all the data on a website using tableadaptors
and objectdatasourc es.

Would it be significantly faster if I was to display the data by
writing the code for a datareader and connecting to the database
directly and populating my tables that way?

Or is the tableadaptor using a datareader anyway for simple select
statements?

This all comes about as I have read a few articles regarding the
benefits of datareader over datasets, and I am a bit confused if the
tableadaptor/objectdatasourc e method I am using is using datareaders or
datasets?

I have a read quite a few articles but none the wiser as yet.

Thank you,

Steve.

Dec 12 '06 #1
1 3060
This is another one of those "will everything go faster" type conversations.
Underneath the hood, data access ultimately comes down to a firehose cursor.
In ADO.NET, this is a DataReader. So, if you only want speed, go for it and
switch everything to DataReaders. The problem is software development is
more than pure speed.

As an analogy, consider the cars that drive on the Bonneville flats. They
are designed to go over 300 MPH. Pur performance. But, you could never use
one of these rocket giants in rush hour traffic, as they are tuned for speed
.... period.

Whenever one looks at pure performance, they end up losing other elements.

Now, if pure speed is your ultimate objective, here is my suggestion. Can
the DataReader idea and create a C native DLL that pulls data as quickly as
possible. Attach to that DLL using native calls and blast the data to your
page. It will not be flexible. It will be hard to maintain. But, damn, it
will be fast. :-)

The point? Table adapters are more flexible than firehose cursors. While
they do not perform as well, they are pretty darned fast. And, they are
fairly easy to maintain. If you have a performance problem, you might need
to get rid of the TableAdapter, but make sure it is a performance problem
before you throw everything away.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** **************
Think outside the box!
*************** *************** **************
"Steve" <ba****@iranman ia.comwrote in message
news:11******** **************@ 73g2000cwn.goog legroups.com...
Hi, I currently display all the data on a website using tableadaptors
and objectdatasourc es.

Would it be significantly faster if I was to display the data by
writing the code for a datareader and connecting to the database
directly and populating my tables that way?

Or is the tableadaptor using a datareader anyway for simple select
statements?

This all comes about as I have read a few articles regarding the
benefits of datareader over datasets, and I am a bit confused if the
tableadaptor/objectdatasourc e method I am using is using datareaders or
datasets?

I have a read quite a few articles but none the wiser as yet.

Thank you,

Steve.
Dec 12 '06 #2

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

Similar topics

12
467
by: Thomas Scheiderich | last post by:
I have 2 dropdowns that are exactly the same and I don't want to re-read for each. Is there a way to do something like below where I read the data, bind to depCity1 and then bind to destCity2. I find that the second one always is blank. I assume this is because the DataReader is read-forward only. ...
20
5513
by: Mark | last post by:
Hi all, quick question , a DataView is memory resident "view" of data in a data table therefore once populated you can close the connection to the database. Garbage collection can then be used to "clean up" the DataView once it is not referenced and will not effect the number of connections to the database. A DataReader on the other hand...
7
3387
by: Varangian | last post by:
Hi all, the question I want to ask if the conversion of a DataReader to a Table looping through the DataReader is better than using the Fill Method of the DataAdapter... I'm asking because internally the DataAdapter uses the DataReader... so whats the deal of writing a method that converts a DataReader into a DataTable ? Thanks!
0
1006
by: G .Net | last post by:
Hi Can anybody give me a step by step guide on how to access a sql DataAdaptor via the new TableAdaptor in VS2005? More specifically, I want to override RowUpdated and I can't see how to do it in VS2005. Thanks in advance
1
1400
by: =?Utf-8?B?QW5kcmU=?= | last post by:
I used the wizard in VS2005 to create my connection, dataset, and tableadaptor I have a typed dataset named dsUserInfo I have a tableadaptor named taFillUserInfo I would like to on the vb side be able to do update the database when a button is clicked executing the following code. if me.textbox1.text = "x" then taFillUserInfo.text1 =...
1
1138
by: Andy B | last post by:
I have a delete query that spans 2 tables: NewsArticles and NewsHeaders. I am trying to figure out what tableAdaptor to put the delete query under since it deals with 2 tables. Should it be in the NewsArticles table since thats what it does? is delete newsArticles? or should it be in the NewsHeaders table since it has to unlink categores from...
2
1771
by: Andy B | last post by:
Is there an easy way to convert tableAdaptor queries into stored procs without messing up the dataTables in the dataSet or losing the queries themselves?
0
1019
by: Andy B | last post by:
How do you put more than 1 sql query in a single tableAdaptor query?
0
1025
by: Rob | last post by:
Hi i'am working with Visual Basic 2005 using Ado.The problem is that I had to change a table in MsAccess (change several textfield/boolean into numeric fields). Now i want to update tableadaptor in VB.net but without success. I've tried to configure and follow the wizard , but he imports the changed fields at the end of table and also...
0
7415
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7440
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5344
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.