我改为:
procedure TForm1.Button5Click(Sender: TObject);
VAR
BINSTREAM:TMEMORYSTREAM;
MESSAGEPART:TIDMESSAGEPARTS;
begin
IF NOT AD1.Active THEN
AD1.Open;
MESSAGEPART:=TIDMESSAGEPARTS.Create(APPLICATION);
BINSTREAM:=TMEMORYSTREAM.Create;
TBLOBFIELD(AD1.FieldByName('MESSAGEPARTS')).SaveToStream(BINSTREAM);
BINSTREAM.Seek(0,SOFROMBEGINNING);
BINSTREAM.ReadComponent(TCOMPONENT(MESSAGEPART));
......................
END;
再在提示:Stream read error;
好象错在:BINSTREAM.ReadComponent(TCOMPONENT(MESSAGEPART));