How can I read the text from a Paradox Memo field? I need to read several
memo fields (from different records in the same table) into several
TMemo variables (created at run time) on the same form. (TDBMemo is not
useful in this case). The memo field contents may be of any length.
Having added the proper TTable object to my form, and added the Paradox
Memo field to my fields list as a TMemoField, I am unable to access the
contents of the memo field.
The TMemofield property Astring yields (Memo) which is of no use.
The Tmemofield property Text yields (Memo), and seems generally
useless as it holds a max of 255 chars in a TMemo.
I have also tried to use the Tmemofield GetData method as follows...
var Buffer: PChar;
GetMem(Buffer,MemoField.DataSize+1);
if not MemoField.GetData(Buffer) then
MessageDlg('TMemofield is NULL', mtInformation, [mbOK], 0)
else
begin
Buffer:=StrCat(Buffer,#0);
{ do something with Buffer }
end;
FreeMem(Buffer,MemoField.Size+1);
...but the GetData method gives a GPF (Operation not Applicable)
(I also tried it with an untyped pointer, with the same result)
This seems like a very common type of data access. What should I be doing?
Thanks, in advance.
Dave.