Link to home
Start Free TrialLog in
Avatar of Grmek
GrmekFlag for Croatia

asked on

DB Filtering BLOB (RTF) Fields

I have a Pardox database and I use TQuery to join tables. In TQuery I have BLOB field (with RTF document). I need to filter my database by this BLOB field. I tried with QueryFilterRecord(aDataSet: TDataSet; var Accept: Boolean) event. When I need to access to BLOB field I get this message:
---------------------------
Debugger Exception Notification
---------------------------
Project KatalogZapisa.exe raised exception class EDatabaseError with message 'Query: Cannot access field 'Sadrzaj' in a filter'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help  
---------------------------
But when I access another field which isn't BLOB field, everything is OK.

My code looks like this:
 
procedure TData.QueryFilterRecord(aDataSet: TDataSet; var Accept: Boolean); var
  s: TStream;
begin
        s := TStream.Create;
        try
            s := aDataSet.CreateBlobStream(aDataSet.FindField('Sadrzaj'), bmRead);
            MainForm.Re.Clear;
            MainForm.Re.Line.LoadFromStram(s);
            Accept := MainForm.Re.FindText(FindWhat, 0, Length(MainForm.re.Text), []) <> -1;
        finally
            s.Free;
        end;
end;
 
Can anybody help me?
ASKER CERTIFIED SOLUTION
Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial