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

Home Posts Topics Members FAQ

Memory Table in .NET ?

Hi,

I've 4 fields are as follows:

Field Name DataType
---------- --------
SLNo AutoIncrement
ItemCode String(10)
Qty Integer
Price Currency

I've three textboxes in a form, and I'll be validating accordingly and once
validation suceeds, I want to store in a memory table. I don't want to use
Arrays. I should be able to add/edit/delete and display all the records in a
grid. And I should be able to wipe out the information once my work is done.

Can I use DataTables / XML, if yes how? Any ideas will be highly
appreciated.

Regards
ItsMe
Nov 20 '05 #1
7 3869
Cor
Hi ItsMe...
I've three textboxes in a form, and I'll be validating accordingly and once validation suceeds, I want to store in a memory table. I don't want to use
Arrays.


You confuse me, what is a memory table?
I always was thinking that an array was a memory table, but it seems not to
be.
Cor
Nov 20 '05 #2
I meant Memory table means Temporary table which resides on the memory like
array. I think table will be more userfriend than an array. What do you
think that i should use Array or DataTable ? Any idea ?
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader22.wxs.nl...
Hi ItsMe...
I've three textboxes in a form, and I'll be validating accordingly and once
validation suceeds, I want to store in a memory table. I don't want to use Arrays.


You confuse me, what is a memory table?
I always was thinking that an array was a memory table, but it seems not

to be.
Cor

Nov 20 '05 #3
Cor
Hi,
I think maybe you can use a XML file as a dataset.
I did that once and is not a hell of a job although I have no example.
I thought that that is easily to bind to almost everything.
As far as I remember me, did Fergus give some examples of that in this
newsgroup, maybe you can do a Google search.
Cor
Nov 20 '05 #4
ItsMe,
As Cor stated you want to use a DataSet. A DataSet contains one or more
DataTables. A DataTable is very similar to a database table only it resides
in memory.

A DataSet is able to be stored as an XML file, however while in memory it is
not XML. Its actually a collection of collections of objects. Using
DataAdapters a DataTable can be persisted to a database. However it never
needs to be persisted (it can be created, used, and discarded).

If the table is for a single form, I would suggest you simply select the
Data tab of the tool box and drag a DataSet onto your form. Select 'Untyped
dataset' then click Ok. Within the properties Window for the DataSet that
was created (it will be in the component tray of your form). you can select
Tables, and use the Table Collection Editor to define your table &
columns...

If the table is used for multiple forms, then you may want to add a DataSet
to your project and define it there.

Of course you can define the DataTable & DataColumn objects completely in
code also.

David Sceppa's book "Microsoft ADO.NET - Core Reference" from MS Press
provides a wealth of information on Datasets and DataTables and how to
interact with them from code.

DataSet & DataTable (along with the other supporting classes) are found in
the System.Data namespace and the System.Data assembly.

Hope this helps
Jay

"ItsMe" <it*******@yahoo.com> wrote in message
news:Ol**************@TK2MSFTNGP10.phx.gbl...
Hi,

I've 4 fields are as follows:

Field Name DataType
---------- --------
SLNo AutoIncrement
ItemCode String(10)
Qty Integer
Price Currency

I've three textboxes in a form, and I'll be validating accordingly and once validation suceeds, I want to store in a memory table. I don't want to use
Arrays. I should be able to add/edit/delete and display all the records in a grid. And I should be able to wipe out the information once my work is done.
Can I use DataTables / XML, if yes how? Any ideas will be highly
appreciated.

Regards
ItsMe

Nov 20 '05 #5
"ItsMe" <it*******@yahoo.com> wrote in news:O5Xf0BzhDHA.2120
@TK2MSFTNGP10.phx.gbl:
What do you
think that i should use Array or DataTable ?


A DataTable is a good choice... it's extremely flexible and powerful.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #6
Hi,

Use a structure; then build a datatable from it to display it in the grid.
(You might be able to display the structure directly in the grid, but I'm
not certain about this.) The data is by definition destroyed when the work
is done, unless you choose to save it to a permanent table.

HTH,

Bernie Yaeger

"ItsMe" <it*******@yahoo.com> wrote in message
news:Ol**************@TK2MSFTNGP10.phx.gbl...
Hi,

I've 4 fields are as follows:

Field Name DataType
---------- --------
SLNo AutoIncrement
ItemCode String(10)
Qty Integer
Price Currency

I've three textboxes in a form, and I'll be validating accordingly and once validation suceeds, I want to store in a memory table. I don't want to use
Arrays. I should be able to add/edit/delete and display all the records in a grid. And I should be able to wipe out the information once my work is done.
Can I use DataTables / XML, if yes how? Any ideas will be highly
appreciated.

Regards
ItsMe

Nov 20 '05 #7
Dear Cor,

I've done using DataTable, and it works perfectly fine and you can destroy
it after your work finsih, so it won't remain in the memory.

And I'll definitely look into xml datasets as well.

Thanks
Regards

"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
Hi,
I think maybe you can use a XML file as a dataset.
I did that once and is not a hell of a job although I have no example.
I thought that that is easily to bind to almost everything.
As far as I remember me, did Fergus give some examples of that in this
newsgroup, maybe you can do a Google search.
Cor

Nov 20 '05 #8

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

Similar topics

1
by: Jaime Stuardo | last post by:
Hi all... I have a table that will never change. Specifically it's a mortality chart that I need to use to make some calculations. One column of the table is the age of the person, and other...
0
by: dudi | last post by:
I am encountering the following strange problem which causes the application to use more memory then it should. I have 5 database tables. lets pretend I want to load each one of them into a...
1
by: Antar | last post by:
Hi, I'm kind of a newbie on DB management but I have to deal with a huge DB used for real time operations. I got a temporal table where current data is stored to work with frecuently, and then a...
11
by: William Buch | last post by:
I have a strange problem. The code isn't written by me, but uses the qsort function in stdlib. ALWAYS, the fourth time through, the memory location of variable list (i.e. mem location = 41813698)...
4
by: Evangelista Sami | last post by:
hello all i am implementing an application in which a large number of (char *) is stored into a hash table structure. As there may be collisions, each (char *) inserted into my hash table is...
25
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
5
by: Rodrigue | last post by:
I have code where I populate a data table using visual basic.net code. I call the clear method on the table but it does not seem to release the memory. When I populate the table again, the memory...
0
by: Kevin Bartz | last post by:
-----Original Message----- From: Kevin Bartz Sent: Monday, August 09, 2004 10:37 AM To: 'mike@thegodshalls.com' Subject: RE: Out of swap space & memory Thanks for your reply, Mike!...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
0
by: Warren Sirota | last post by:
Hi, I've got a global in-memory table which is kind of a control table for a lot of processes. I've added quite a few non-persisted properties to the row objects in memory, such as collections...
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
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...
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
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
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
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.