VAR
TadoQuery;
Stream: tmemorystream;
Begin
Query: = tadoquery.create (nil);
Query.Close ();
Query.sql.add ('select * from a');
Query.open ();
IF (Query.Recordcount> 0) THEN Begin
Query.edit ();
Stream: = TMEMORYSTREAM.CREATE ();
Stream.LoadFromfile (FilePath);
TBLOBFIELD (Query.fieldByname ('pphoto')). LoadingFromstream (stream);
Freeandnil (stream);
Query.post ();
END;
Query.Close ();
Freeandnil (Query);