First I retrieved the data into a file as follows:
Code: Select all
GetaMemoBlob(self, mySpecies.ASubSpc.CurrSubFamily, mySpecies.ASubSpc.CurrSubSpeciesID,
aMemotype, myFile, IsValid);
procedure GetaMemoBlob(AOwner: TComponent; SubFamily : string; SubSpeciesID : integer;
theMemoType : string; ThePath : string; var MemoValid : boolean);
var
myQry: TSQLQuery;
TempField: TBlobField;
begin
if assigned(SpeciesDBCnx) then
begin
try
myQry := TSQLQuery.create(nil);
myQry.SQLConnection := SpeciesDBCnx;
myQry.SQL.Clear;
myQry.SQL.Add('SELECT * FROM MEMOS WHERE SUBSPECIES_ID = '
+ '''' + inttostr(SubSpeciesID) + '''' +
' AND MEMOTYPE=' + '''' + theMemoType + '''');
myQry.open;
if not myQry.Eof then
begin
MemoValid := true;
TempField := TBlobField(myQry.FieldByName('MEMODATA'));
TempField.SaveToFile(ThePath);
end
else
MemoValid := false;
myQry.close;
finally
FreeAndNil(myQry);
end;
end;
end;
Code: Select all
if IsValid then
begin
aRVComponent.LoadRVF(myFile);
aRVComponent.Format;
end;
Code: Select all
if IsValid then
begin
aREComponent.Lines.LoadFromFile(myFile);
end;
Bennie