Board index » delphi » TStringList - I'm doing something wrong here - HELP

TStringList - I'm doing something wrong here - HELP

I am sure this is a basic mistake I am making so I won't bore you with
the details.

I am trying to use a TStringList in D2 to get a list of tables back
using GetTableNames. However, I keep getting a memory error. I think
this is to do with not allocating memory for the TStringList I have
created.

Can someone point me at an example of how to use TStringList properly
please.

Email reply appreciated. Thanks.

richa...@informationlink.demon.co.uk

 

Re:TStringList - I'm doing something wrong here - HELP


Richard Percival <richa...@informationlink.demon.co.uk> wrote in article
<350979BC.6B945...@informationlink.demon.co.uk>...

Quote
> I am sure this is a basic mistake I am making so I won't bore you with
> the details.

> I am trying to use a TStringList in D2 to get a list of tables back
> using GetTableNames. However, I keep getting a memory error. I think
> this is to do with not allocating memory for the TStringList I have
> created.

> Can someone point me at an example of how to use TStringList properly
> please.

> Email reply appreciated. Thanks.

> richa...@informationlink.demon.co.uk

This code works quite well:

var
  List: TStringList;
begin
  List:= TStringList.Create;
  Session.GetTableNames('DBDEMOS','*.db',False, False, List);
...

Other Threads