Re: About using DataRow...
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 10/26/04
- Next message: Kavvy: "HttpResponse not working"
- Previous message: Regina Krupitskaya: "Re: Using RSA encryption with C# and Java"
- In reply to: MrNobody: "About using DataRow..."
- Next in thread: MrNobody: "Re: About using DataRow..."
- Reply: MrNobody: "Re: About using DataRow..."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 26 Oct 2004 11:32:36 -0400
MrNobody,
I would say create a typed data set. You can use the designer to create
the data set structure in the editor, and then it will create a strongly
typed data set (with properties that you can access instead of using field
lookups). It should help with this sort of transition, and help reduce the
amount of code that you need to change.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"MrNobody" <MrNobody@discussions.microsoft.com> wrote in message
news:C5938C8F-955E-441F-903E-AE0A9FC7EFC4@microsoft.com...
> When I initialize my program I need to load from several sources of data
> from files which are in a table form- in each set of data they share
> fields
> (like say name address phone). I used to load them into a Hashtable keyed
> by
> ID where the value is a class that has all the fields required (name,
> address, etc...)
>
> Now after discovering the power of DataTables and DataGrids I have decided
> to load my data into that format instead, but much of my program still
> depends on those concrete classes I had which had those fields and methods
> specific to the data I load. With DataTables, that data had to be loaded
> into
> this abstract DataRow which has no methods or fields specific to the data.
> So
> now I'm wondering should I still keep my Hashtable of classes (Which begs
> the
> question: when loading a DataRow does it actually copy my data from my
> Hashtable or does it reference it?) or is there a way to customize DataRow
> so
> I can have those specific fields and methods in the DataTable so I can get
> rid of this HAshtable?
- Next message: Kavvy: "HttpResponse not working"
- Previous message: Regina Krupitskaya: "Re: Using RSA encryption with C# and Java"
- In reply to: MrNobody: "About using DataRow..."
- Next in thread: MrNobody: "Re: About using DataRow..."
- Reply: MrNobody: "Re: About using DataRow..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|