473,668 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Data Access: Data reader vs. Ado.Net

2 New Member
Hy ! I'm at the begining of an application. I have a module with a datagrid/listview (not sure yet) in wich I display data. I insert, update, delete only one row at a time in only one table. I can use a datatable from a dataadapter.fil l() and bind datagrid to datatable. OR I can use a datareader from an comm.ExecuteRea der() and add rows to listview/datagrid. I want speed for my application. So which is better an faster: from datadapter or from executereader? Thank tou
May 18 '07 #1
2 2084
kenobewan
4,871 Recognized Expert Specialist
Welcome to the site. Datareader is faster but dataset is better for bind to controls. HTH.
May 18 '07 #2
dactilifera
2 New Member
"Datareader is faster but dataset is better for bind to controls" - ok, but as a whole : create the datareader + parse and add to datagrid versus create the dataadapter+fil l the datatable and add to datagrid which is faster?
May 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2084
by: Oyvind | last post by:
I'm working on a Windows forms/C# database application. My background is 6-7 years of VB 4 - 6, MS Access, VC++, mixed in with a lot of T-SQL and MS SQL Server in general and some OOA/OOD. Previously, I haven't been overly impressed with the capabilities of the various "graphical" data access tools that have been provided with VB etc. Though deceptively simple to get started with, IMHO they haven't provided the necessary flexibility...
2
6544
by: Robert Smith jr. | last post by:
Hello, Please pardon my newbie question ... I am building an ASP.NET page that displays a recordset with a Delete statement enabled (this all works fine). I want to Insert the current row *that is going to be deleted* into another table, before the original data is deleted. I am trying to use the RowDeleting method to call an Update or Insert
15
4734
by: Marcus | last post by:
I created a VB.Net 1.1 application that iterates through all the tables in any basic Access 2000 database passed to it and generates the same table structure in a SQL Server Express database. The structure is created fine (with minor data conversions from one to the other, e.g. yes/no --> bit, memo --> text, etc). My problem now is transferring the data over from Access to SQL Server. I thought it would be a fairly straight forward...
0
1186
by: Crazy Cat | last post by:
In the following code I retrieve data from a stored procedure that returns multiple resultsets (the results of the stored procedure have been stored in a datareader called reader). On each iteration a tab page is added to a tab control and a datagridview is created on that the tab page. In the first iteration I can set all the values with no problems, however on the next iteration, even though there is definitely data in the data source,...
4
3469
by: MarkusR | last post by:
If I run the stored proc in the Query Analyzer this works and I get the expected result set back. However when I run it in my application I get a results set of one row but when I try to access the values I get "Invalid attempt to read when no data is present". private void GetLotIDPriorityFromLot(string aLotDesc, out int aLotID, out DateTime aPriorityDate) { SqlConnection Conn; SqlDataReader reader = null;
1
2508
by: Tea | last post by:
Please help me ! My data in Microsoft Access Query direct in MS Access : I wrote Select * from TableA where field1 like '*abc*' Query from Visual Basic : I wrote Select * from TableA where field1 like '%abc%' But query from C#: I don't known how to write! ????? Please help me ! Thanks
3
2699
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, how do you resolve this problem? i have a public procedure in my DataAccessLayer that gets a SqlDataReader how do i close the reader from inside the DataAccessLayer if I'm returning the reader to get bound to my GridView? Any code after my return will be unreachable. thanks,
5
5720
by: grant | last post by:
I'm trying to use a scatter chart to plot level reading for a pump station level sensor. The sensor takes a reading every 4 seconds, and there are 23,000 reading per chart There appears to be a limit of 4000*4000 data points in MS Chart so I have had a play with the Office 10 activX chart control, but cant get that to plot the data at all. It always try to summaries the data for some reason fathomable only to Bill Gates! Mind you, the...
1
3502
by: =?Utf-8?B?SkI=?= | last post by:
Hello My pgm1 (User Interface Level) passes an empty ArrayList to pgm2 (Business Logic Level). pgm2 then calls pgm3 (Data Access Level) to populate the ArrayList. Question1: When pgm2 gets the ArrayList back from pgm3 how to extract and separate the fields out fo the ArrayLists? Question2: When pgm3 gets ArrayList back from pgm2 how to separate the
1
2810
by: dotnetnovice | last post by:
Hi everybody... I want to show data in the data gridview placed in my form after getting data from my data access layer class through a class... Here is my code in the data access layer class. public class DBHandler { public List<Programs> GetAllPrograms() {
0
8459
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8575
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2784
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
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.