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