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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
intheConnect With a Mentor Commented:
i change my comment to answer and i thank chris ;-)
0
 
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
 
waipahuAuthor Commented:
It worked!!!!! Thanks so much!!!!!!!!!!!
Mahalo--means thank you in hawaiian

bye :)
0
All Courses

From novice to tech pro — start learning today.