HOw do you convert Dbase memo field to a string variable?

HOw do you convert a memo field into an array (string) variable?

line 1 of memo field to var_string[1]
line 2 of memo field to var_string[2]....etc etc etc

Thanks
waipahuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

intheCommented:
hi,
well this is with plain normal tmemo but it is probably similar:

procedure TForm1.Button1Click(Sender: TObject);
var
var_array : array[0..maxchar] of string;
i : integer;
begin
for i := 0 to memo1.Lines.count -1 do
 begin
  var_array[i] := memo1.lines.Strings[i];
 end;
edit1.text := var_array[0];
edit2.text := var_array[1];
edit3.text := var_array[2];
end;

Regards Barry
0
she3i3iCommented:
waipahu,

inthe's answer is correct. I'd just like to tell you that you need to do that (since you mentioned a DBMemo) on the DataSet's AfterScroll event in order for the DBMemo to have populated properly (especially if there is alot of data in the DBMemo field).

Cheers, Chris.
0
intheCommented:
i change my comment to answer and i thank chris ;-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
waipahuAuthor Commented:
It worked!!!!! Thanks so much!!!!!!!!!!!
Mahalo--means thank you in hawaiian

bye :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.