473,406 Members | 2,620 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,406 software developers and data experts.

Data display? (Continued)

Since the original thread is marked as answered, I thought I'd post here to
ensure visibility.

Hi John and Steven,

I'm going the dataset route as access doesn't seem to be too keen on that
level of complexity in joins. Anyway, I'm curious as to why it makes more
sense to fill a datatable and then contsruct a new datatable from the first
one. Why not just create a datatable based off of a datareader? To be honest,
I'm not too familiar with the other method of accessing data through a data
table. I'm more used to a forward-only cursor. I invision enumerating through
the datareader and for each entry saying something like,

"If username doens't already have a datarow, create one. Now, add hours to
the appropriate column."

So it would create the row if necessary, and then in either case, would add
the hours. Is there a way to do this type of check? it would avoid the need
to enumerate through the datasource adding all the rows and then re-enumerate
through to add hours.

I guess I'm just not sure of how to enumerate through a datasource which
gives you this level of flexibility. My mental model has always invovled
working around the narrow confines of a foreward only cursor and not a random
access model. Any thoughts?

-Ben

May 25 '06 #1
3 1257
Hi Ben,

Thank you for your further posting.

As for the new questions you mentioned, here are some of my understanding:

1. As for forward only and cursor based data access components, such as
datareader, the data reading should be performed during the lifecycle of
the datareader and connection. After we finishing using it, we should close
the reader and connection and next time we need to execute query and
establish connection again.... However, it won't occupy much application
memory

2. As for DataSet/DataTable, they're random accessable and do not rely on a
live server cursor and database connection. It is only when we query the
DataSet/DataTable do we need to open the connection. After we close the
connection ,the DataSet/DataTable still exists in our memory and we can
cache it to avoid unnecessary data accessing to backend database. And we
can directly access each DataRow in the DataTable through the
DataTable.Rows collection (by rowIndex).
In addition, DataTable also provides simple SQL- like query engine that can
help perform datarow querying depend on some simple query criteria:

#DataTable.Select Method (String)
http://msdn2.microsoft.com/en-us/library/det4aw50.aspx

BTW, here is a roadmap on ADO.NET which may also be helpful:

#INFO: Roadmap for ADO.NET
http://support.microsoft.com/?id=313590

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 26 '06 #2
Hi Steven,

Thanks for the response. I think I may not have been thorough in my
question, though. I actually do understand the fundamental differences
between how a datareader and datatable operate, but would like to understand
why it is suggested that I use a datatable rather than a datareader to solve
the problem I brought up previously in the thread "Data display?". To put it
otherwise, what does the random accessibility provide for me that I need?

Do you have any thoughts on this?

Thanks...

-Ben
"Steven Cheng[MSFT]" wrote:
Hi Ben,

Thank you for your further posting.

As for the new questions you mentioned, here are some of my understanding:

1. As for forward only and cursor based data access components, such as
datareader, the data reading should be performed during the lifecycle of
the datareader and connection. After we finishing using it, we should close
the reader and connection and next time we need to execute query and
establish connection again.... However, it won't occupy much application
memory

2. As for DataSet/DataTable, they're random accessable and do not rely on a
live server cursor and database connection. It is only when we query the
DataSet/DataTable do we need to open the connection. After we close the
connection ,the DataSet/DataTable still exists in our memory and we can
cache it to avoid unnecessary data accessing to backend database. And we
can directly access each DataRow in the DataTable through the
DataTable.Rows collection (by rowIndex).
In addition, DataTable also provides simple SQL- like query engine that can
help perform datarow querying depend on some simple query criteria:

#DataTable.Select Method (String)
http://msdn2.microsoft.com/en-us/library/det4aw50.aspx

BTW, here is a roadmap on ADO.NET which may also be helpful:

#INFO: Roadmap for ADO.NET
http://support.microsoft.com/?id=313590

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 26 '06 #3
Thanks for your response Ben,

em... I think we still need to refer to the scenario mentioned in your
former thread. In your previous case, you need to perform some complex
structure data querying from an Access Database. However, access database
doesn't support as complex SQL scripts as SQL Server... Then, we can use
DataAdapter to query out data as DataTable and store them in DataSet. The
ADO.NET DataSet provide powerful local data manipulation functionality. For
example, we can query out multiple DataTables (which has relationship with
each other) and store them in the same DataSet, and then we can add
relationShip for them in the DataSet. Thus, the parent Table's DataRow can
reference its childTable's Rows through DataRow.GetChildRows....

This is just like a local database engine we can perform some data
manipulation among multiple local datatables in the DAtaSet without the
limitation of the backend database storage.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 29 '06 #4

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

Similar topics

9
by: dasacc | last post by:
Hi, I've only been using python for two days now but I'm working on it. I have the following text: <select><option></option><option></option></select><select><option></option></select> My...
2
by: Corepaul | last post by:
As input is typed into a text box, I would like to search a recordset for the first record that matches what has been typed so far. I would like to update the text box to display the letters typed...
9
by: Tony Lee | last post by:
Some time a ago, on this newsgroup the following comments were made in recommending good references for Access (2003) >I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
0
by: Nunya Biznas | last post by:
I have a two column report that needs to have the word "continued" appear at the top of the 2nd column if the detail records are part of the group from the previous column. I have tried using a...
0
by: Ken Allen | last post by:
I am relatively new to C# and .Net in general, but have been programming in many other languages for more years than I want to recall. I have a problem where an existing set of code (actually a...
4
by: CJ Taylor | last post by:
Alright, I wrote this program that is used throughout my entire company for the past 9 months. Now, we have deployed it to well over 100 machines. So my Sys Admin comes up to me today and...
4
by: andreas.w.h.k. :-\) | last post by:
How do I change the address location in the wsdl <wsdl:port name="SearchSoap12" binding="tns:SearchSoap12"> <soap12:address location="http://searchservices/engine/search.asmx" /> </wsdl:port> ...
1
by: usman.cs | last post by:
Consider the structure C:\firstFile.php C:\add\secondFile.inc.php A user comes and postes some data to firstFile.php . Then the file does a whole bunch of processing on the posted data. Now...
3
by: RAR in WA | last post by:
I'm moving to .Net framework 2.0 from Visual Studio 2002/3 with more time on desktop apps than ASP.Net, although I have done a small amount in ASP.Net. Is best practice for ASP.Net now to use the...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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
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,...
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.