> SL.Assign(DB.FieldByName('SomeFieldName') as TMemoField);
In which Delphi version you managed to compile that line?
I tried with Delphi XE, as well as Lazarus, no success.
Because the parameter that "SL.Assign" is expecting is TStrings, while TMemoField is TBlobField. So you will end up with "Invalid TypeCast" when you try that.
Playing around you end up getting "Class or Object types "TMemoField" and "TStringList" are not related"
Instead of TypeCasting you could have stored the value in a TStream variable and then loaded the stream to the StringList.
> I need to assign a value stored in an TMemoField to TStringList.
But why complicating things, while the simplest text assigning can be (zeljko you meant this right?):
SL.Text := DB.FieldByName('SomeFieldName').ASString;
unless you plan to do something that is unclear to us, and hence you need to explain.