var
query :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')).LoadFromStream(stream);
FreeAndNil(stream);
query.Post();
end;
query.Close();
FreeAndNil(query);
query :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')).LoadFromStream(stream);
FreeAndNil(stream);
query.Post();
end;
query.Close();
FreeAndNil(query);