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

ADO.NET dataset limit

RdS
hello,

When I create a form that ties to dataset of table with only 20 records in
it I understand that all 20 records are copied to my local computers memory
for manipulation. Then if rows were modified the tableadapter class updates
table in DB. However, I am curious to know what occurs if a table has
thousands or 100's of thousands of rows in it. Does ado.net copy all of the
rows to my local computers memory if I don't specify a condition for what
records I want returned?

For instance if my form will allow user to browse all customer records.
Won't we start to have memory issues and slow initial performance while all
records are copied to local storage? How does ADO handle large datasets?

How should I handle such a case?

Thanks in advance.
Jul 28 '06 #1
4 3965
Hi RdS,

Yes, as you understand, when you use a DataAdapter to fill the DataSet, it
puts all the records that SELECT statement returns into the DataSet. If the
SELECT statement returns 100's thousand rows, they will all be filled to
the DataSet. Whether this operation will succeed depends on how big your
memory is.

However, in my opinion, if you have a 100's thousand database table, it is
not a good idea to fill everything into the DataSet. Here are the reasons:

1. As you know, memory will be used up, and apps are slowed down.
2. A user cannot see every record since he's not a super man. :-)

In this case, if a user need certain record(s) from the database, use WHERE
clause in SELECT statement. It will return only the rows needed which saves
memory.

In certain cases, a user need to browse all the records, you can use paging
to decrease the amount of data each time that comes to local memory.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

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

Jul 28 '06 #2
RdS
I understood why you wouldn't do and understand how to write SQL statements.
I was just curious if VB would allow such a thing or if it cared. Also, if
someone attempted to fill a dataset with 100's of thousands of records and
the memory couldn't hold it what errors would be encountered?

Thanks,

"Kevin Yu [MSFT]" <v-****@online.microsoft.comwrote in message
news:12**************@TK2MSFTNGXA01.phx.gbl...
Hi RdS,

Yes, as you understand, when you use a DataAdapter to fill the DataSet, it
puts all the records that SELECT statement returns into the DataSet. If
the
SELECT statement returns 100's thousand rows, they will all be filled to
the DataSet. Whether this operation will succeed depends on how big your
memory is.

However, in my opinion, if you have a 100's thousand database table, it is
not a good idea to fill everything into the DataSet. Here are the reasons:

1. As you know, memory will be used up, and apps are slowed down.
2. A user cannot see every record since he's not a super man. :-)

In this case, if a user need certain record(s) from the database, use
WHERE
clause in SELECT statement. It will return only the rows needed which
saves
memory.

In certain cases, a user need to browse all the records, you can use
paging
to decrease the amount of data each time that comes to local memory.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

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

Jul 28 '06 #3
You wil receive an out of memory exception

regards

Michel Posseth

"RdS" <rd*@nospam.nospamschreef in bericht
news:OG**************@TK2MSFTNGP05.phx.gbl...
>I understood why you wouldn't do and understand how to write SQL
statements. I was just curious if VB would allow such a thing or if it
cared. Also, if someone attempted to fill a dataset with 100's of
thousands of records and the memory couldn't hold it what errors would be
encountered?

Thanks,

"Kevin Yu [MSFT]" <v-****@online.microsoft.comwrote in message
news:12**************@TK2MSFTNGXA01.phx.gbl...
>Hi RdS,

Yes, as you understand, when you use a DataAdapter to fill the DataSet,
it
puts all the records that SELECT statement returns into the DataSet. If
the
SELECT statement returns 100's thousand rows, they will all be filled to
the DataSet. Whether this operation will succeed depends on how big your
memory is.

However, in my opinion, if you have a 100's thousand database table, it
is
not a good idea to fill everything into the DataSet. Here are the
reasons:

1. As you know, memory will be used up, and apps are slowed down.
2. A user cannot see every record since he's not a super man. :-)

In this case, if a user need certain record(s) from the database, use
WHERE
clause in SELECT statement. It will return only the rows needed which
saves
memory.

In certain cases, a user need to browse all the records, you can use
paging
to decrease the amount of data each time that comes to local memory.

Kevin Yu
Microsoft Online Community Support

================================================= =
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================= =

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


Jul 30 '06 #4
Yes, OutOfMemoryException. You can check the following link for more
information

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemoutofmemoryexceptionclasstopic.asp

Kevin Yu
Microsoft Online Community Support

==================================================

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

Jul 31 '06 #5

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

Similar topics

6
by: Omar | last post by:
When I try to databind my comboBox (specifically field "emplcode") to a filled dataset , the contents of the comboBox displays a bunch of "System.Data.DataRowView". I assume the amount of times...
3
by: Benny | last post by:
Hi When I load a dataset with data obtained from a db, the dataset is stored in the memory of the client system. AFAIK the size of the dataset (which implicitly mean the number of rows that can be...
1
by: Johann Blake | last post by:
I have a dataset that contains a parent table and a child table. A DataRelation exists between the two. I was under the impression from reading the VS docs that when I filled the parent table, the...
2
by: Peter S. | last post by:
I am pulling some data from a source via ODBC and placing the information in a DataSet. The first pull is very large but once that is complete I plan to do nightly pulls to get any new data that...
0
by: Ing. Davide Piras | last post by:
Hi there, .NET 2.0, c# asp.net web service / web application and c# client application. I'm downloading large datasets (one table per dataset, about 8.000 records) page by page, using a pagesize...
15
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 ...
7
by: David | last post by:
Hi, using C# asp.net 1.1 I am having a problem. If I use the code below, but have null passed as the PostingGuid, then by the time I get to fill the dataset, I have "an object is not set to...
7
by: =?Utf-8?B?QWxla3MgS2xleW4=?= | last post by:
I use in my asp.net code dataset and populate datatable using dataadapter. The problem is that my code demand huge amount of memory and I am looking for way reduce this demand. At this time I...
4
by: Franck | last post by:
I need to know what is the limit of column you can put in a datatable which is inside a dataset. i search on MSDN but i was only able to find the maximum amount of rows which is 16millions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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.