Link to home
Start Free TrialLog in
Avatar of hidrau
hidrauFlag for Brazil

asked on

A component to keep string

Hello guys,

I would like to know if there is a component to keep string.

My system will create an access database and all tables I have in script code.

Today they are in my .pas but I would like to keep the code in a component as a

container for string.

any suggestion?
Avatar of Lukasz Zielinski
Lukasz Zielinski
Flag of Poland image

with TStringList You can easily read/write strings and/or textfiles.

ziolko.
Avatar of hidrau

ASKER

I want to do something this way:

I will have a structure by name and strings for each option.

this container will keep all my tables code for creation in my new database access.

I will do something this way

For I := 0 to ListContainer.count do
Begin
  Adoquery.Sql.Add(   ListContainer[i]   )
  Adoquery.execSql;
End;

This way it will create all my tables.

I would like a component name to add my codes in project time.
still You can use TStringList if You need more than one stringlist (like one string list = one sql table creation command) ) use TObjectList to hold multiple instances of TStringList.

ziolko.
Avatar of hidrau

ASKER

could you give me some examples?
you can use the .Text property of strings also if that's easier

Adoquery.Sql.Add(   ListContainer[i]   )
could just be

Adoquery.Sql.Text := S;
ASKER CERTIFIED SOLUTION
Avatar of TheRealLoki
TheRealLoki
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial