Re: About using DataRow...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 10/26/04


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? 


Relevant Pages

  • About using DataRow...
    ... When I initialize my program I need to load from several sources of data ... Now after discovering the power of DataTables and DataGrids I have decided ... depends on those concrete classes I had which had those fields and methods ... this abstract DataRow which has no methods or fields specific to the data. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: SqlDataAdapter Update table with AutoIncrement column
    ... The ds is a data set that I pass into the Method I am working with. ... foreach (DataRow d in dr) ... Thanks for your suggestions this is my code in full, the ifmsAdapter is ... Do I need to check the rowstate. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Database migration
    ... try is by writing code. ... Load all the data from the source db, then update the target db. ... course, if the data set isn't very large, either of the 'obvious' ...
    (perl.beginners)
  • Re: Concatenation order in STEPLIB
    ... When you load a module, the system must first find its directory entry. ... the first data set in the concatenation in which that module lives). ... The LNKLST, when LLA is managing the entire LNKLST, is an exception, as LLA ...
    (bit.listserv.ibm-main)
  • Re: Perl hashing speedup ?
    ... Do you need all of the data in memory, or is it possible to create an small index that refers to the main data stored on disk? ... Load the data into a proper database which are more efficient at dealing with large data sets. ... There may be alternative ways of encoding your data so that it uses fewer Perl data structures. ... Determine how Perl's hashing function is working: there could be lots of collisions in you data set if you have a wide data set as opposed to a deep structure. ...
    (comp.lang.perl.moderated)