Thanks Steve and Paul
That looks to be a neat solution - a StringList of
StringLists.
I'm talking V small tables here.
Mark
On 7 Nov 2002 at 15:56, Stephen Barker wrote:
> Mark,
>
> as you're using DBISAM, I would tend to use a DBISAM memory table with
> method: .ImportTable('thefile.csv',...)
>
> Alternatively, depending on how you want to process the data, use a
> couple of stringlists:
>
> var SLTable, SLRecord : TStringList;
> ...
> SLTable.LoadFromFile('thefile.csv');
> for i:=0 to SLTable.Count-1 do begin
> SLRecord.CommaText := SLTable[i];
> // do some processing of the fields in SLRecord
> ...
>
> If you need to do frequent lookups then store a single string list and
> use the object of each item to store a record.
>
> Or use an ini file:
>
> [Row1]
> col0value=
> col1value=
> col2value=
>
> [Row2]
> col0value=
> col1value=
> col2value=
>
> Retrieve with:
> var SLRecord : TStringList;
> ...
> inifile.ReadSection('Row1', SLRecord);
> col2value := SLRecord[2];
>
>
> regards,
> Steve
>
> > -----Original Message-----
> > From: Mark Howard [mailto:mhoward@;pslog.co.nz]
> > Sent: Thursday, 7 November 2002 03:00 p.m.
> > To: Multiple recipients of list delphi
> > Subject: [DUG]: Multi-column String List?
> >
> >
> > Hi all
> >
> > I want a very simple way to load and access a small lookup
> > table from a
> > comma delimited text file.
> >
> > What would be ideal would be an implementation of a multi column
> > string list that would allow: LoadFromFile and access to a
> > particular row of columns to the right of #1 using
> > Items.IndexOf('Entry_Field') to determine the row
> >
> > I feel sure there must be something simple available.
> >
> > TIA
> >
> > Mark
> > --------------------------------------------------------------
> > -------------
> > New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.404 / Virus Database: 228 - Release Date: 15/10/2002
> >
> >
> ----------------------------------------------------------------------
> -----
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/