I have written a below code in Delphi XE2.
var
stream : TStringStream;
begin
stream := TStringStream.Create;
//Some logic to populate stream from memo.
ShowMessage(stream.datastring); //This line is showing correct data
// some Insert query with below parameter setting
ParamByName('Text').LoadFromStream(stream , ftMemo);
But this is storing text as ???? in table.
This type of code is working fine in Delphi 4.
Is there any issue in TParam.LoadFromStream function in Delphi XE2?
EDIT:
Table field is of type ‘Text’.
After doing some trial and error methods I have found a solution to this problem.
We can use below code,