while not ADOQuery1.eof do
begin
if not ADOQuery1.Fieldbyname('PrintFileName').IsNull then
begin
AFileName := ADOQuery1.Fieldbyname('PrintFileName').AsString;
if FileExists(AFileName) then
begin
APicture := TPicture.Create;
try
APicture.LoadFromFile(AFileName);
SavePicture(APicture, AValue);
finally
FreeAndNil(APicture);
end;
end
else
AValue := '';
self.cxGrid1DBTableView1.DataController.Values[ADOQuery1.RecNo-1, cxGrid1DBTableView1Column3.Index] := AValue;
end;
ADOQuery1.Next;
end;
begin
if not ADOQuery1.Fieldbyname('PrintFileName').IsNull then
begin
AFileName := ADOQuery1.Fieldbyname('PrintFileName').AsString;
if FileExists(AFileName) then
begin
APicture := TPicture.Create;
try
APicture.LoadFromFile(AFileName);
SavePicture(APicture, AValue);
finally
FreeAndNil(APicture);
end;
end
else
AValue := '';
self.cxGrid1DBTableView1.DataController.Values[ADOQuery1.RecNo-1, cxGrid1DBTableView1Column3.Index] := AValue;
end;
ADOQuery1.Next;
end;