you can use
http://www.freepascal.org/docs-html/rtl/classes/tstringlist.html
var
lStrings : TStringList;
begin
....
lStrings :=
TStringList.Create;
with lStrings do
begin
delimiter :=
yourdelimiter; // don?t know if you can use "lineending"
strictdelimiter := true;
DelimitedText := textfromyourfield;
for n :=
0 to count - 1 do
myarray[ n] := strings[ n ];
end;
lStrings.free;
Philippe
Richard Mace wroteThanks Michael. And reading it back?
On 1 Jul 2014 15:57,
"Michael Thompson" wrote
>> Is it
possible to save an array of string to a single string for storing in a string field within a database?
Show quoted text 6 lines
>
> Suspect it'll be something like
> MyString := '';
> For i := Low(MyArray) to High(MyArray) Do
>
MyString := MyString + MyArray[i] + LineEnding;
>
>
MyStringField.AsString := MyString;
>
> On 1 July 2014 16:49,
Richard Mace wrote>
>> Hi All,
>> Is it
possible to save an array of string to a single string for storing in a string field within a database?
>> If so, could anyone give me any
pointers please?
Show quoted text 7 lines
>>
>> Thanks
>>
>> Richard
>>
>> --
>>