473,473 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Alternatives to DataTable

The current implementation (that works) retrieves data from a SS2K db via
stored procedure that returns 40-60 rows and 6 columns (one string and five
int columns), and places that result set into a DataTable that remains in
the Application State (this is an asp.net web application). Various methods
throughout the app read this DataTable - searching for one specific row and
then specific column(s) within the found row. While everything works, I'm
looking to verify that I have (1) considered all reasonable alternatives and
(2) implement the solution with fastest expected performance.

Elsewhere in the application, I have implemented ListDictionary and
HashTable collections with great results. Those structures work great for
name/value pairs that can be retrieved based on a single key value. But the
result set in question contains 6 columns, and searches for specific rows
are based on 2 or 3 columns (currently accomplished using the DataTable's
Select method). Given the need to find a row based on more than one value, I
can't simply retrieve the desired row based on a single key value like I can
with a hash table.

So, what are my alternatives to the DataTable? Or would you recommend
sticking with it?

Thanks!

Nov 16 '05 #1
2 6763
Guadala,

Since the set is small, you might be able to use HashTables to keyed
properly to cover all of your selection criteria, but if you ever needed to
add a column, the unwieldy nature of the solution would make it quite
unmaintainable, IMO. I would recommend sticking with the DataTable, as it
would be easier to maintain in the future, should you have to make changes.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
The current implementation (that works) retrieves data from a SS2K db via
stored procedure that returns 40-60 rows and 6 columns (one string and
five
int columns), and places that result set into a DataTable that remains in
the Application State (this is an asp.net web application). Various
methods
throughout the app read this DataTable - searching for one specific row
and
then specific column(s) within the found row. While everything works, I'm
looking to verify that I have (1) considered all reasonable alternatives
and
(2) implement the solution with fastest expected performance.

Elsewhere in the application, I have implemented ListDictionary and
HashTable collections with great results. Those structures work great for
name/value pairs that can be retrieved based on a single key value. But
the
result set in question contains 6 columns, and searches for specific rows
are based on 2 or 3 columns (currently accomplished using the DataTable's
Select method). Given the need to find a row based on more than one value,
I
can't simply retrieve the desired row based on a single key value like I
can
with a hash table.

So, what are my alternatives to the DataTable? Or would you recommend
sticking with it?

Thanks!

Nov 16 '05 #2
Guadala,

Since the set is small, you might be able to use HashTables to keyed
properly to cover all of your selection criteria, but if you ever needed to
add a column, the unwieldy nature of the solution would make it quite
unmaintainable, IMO. I would recommend sticking with the DataTable, as it
would be easier to maintain in the future, should you have to make changes.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
The current implementation (that works) retrieves data from a SS2K db via
stored procedure that returns 40-60 rows and 6 columns (one string and
five
int columns), and places that result set into a DataTable that remains in
the Application State (this is an asp.net web application). Various
methods
throughout the app read this DataTable - searching for one specific row
and
then specific column(s) within the found row. While everything works, I'm
looking to verify that I have (1) considered all reasonable alternatives
and
(2) implement the solution with fastest expected performance.

Elsewhere in the application, I have implemented ListDictionary and
HashTable collections with great results. Those structures work great for
name/value pairs that can be retrieved based on a single key value. But
the
result set in question contains 6 columns, and searches for specific rows
are based on 2 or 3 columns (currently accomplished using the DataTable's
Select method). Given the need to find a row based on more than one value,
I
can't simply retrieve the desired row based on a single key value like I
can
with a hash table.

So, what are my alternatives to the DataTable? Or would you recommend
sticking with it?

Thanks!

Nov 16 '05 #3

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

Similar topics

5
by: Stefan Turalski \(stic\) | last post by:
Hi, I'm wondering if there is a way to send a method parametrs by ref when DataTabel is a type of this value ? I done some sort of select over DataTable columns, just by removing them froma...
7
by: Tinus | last post by:
Hello all, I was wondering... Is there a way to create a Array so that I can call a value with a name i.s.o. a index number? Something similar like a DataTable. This is what I want: Declare a...
0
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
7
by: Raymond Lewallen | last post by:
Which would be the proper way or the reason for using any of the following or combinations of the following? These are the 3 ways I've figured I can do what I want to do, I just don't know which...
3
by: Gene Hubert | last post by:
I'm using DataTable.ImportRow to move data from one datatable to another... Dim dt, dtTarget As DataTable Dim dr As DataRow dt = DirectCast(Me.DataSource, DataTable) dtTarget = dt.Clone...
11
by: Geoff | last post by:
Hi I have a DataTable with thousands of rows. I want a quick way to insert the rows into a table in an Access database with the same structure. I have been using an update command but found it...
2
by: pagates | last post by:
Hi All, I have a DataTable in a Windows Forms project that I would like to use a Select statement. The problem is, I'd like to be able to do wildcard searches (including single charcater...
5
by: jehugaleahsa | last post by:
Hello: I am trying to find what is the very best approach to business objects in Windows Forms. Windows Forms presents an awesome opportunity to use DataTables and I would like to continue doing...
5
by: jehugaleahsa | last post by:
Hello: What is the point of using a DataTable in ASP .NET? We are unsure how you can use them without 1) rebuilding them every postback, or 2) taking up precious memory. We are not sure how to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
1
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
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.