Grmek
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(aD ataSet: TDataSet; var Accept: Boolean); var
s: TStream;
begin
s := TStream.Create;
try
s := aDataSet.CreateBlobStream( aDataSet.F indField(' Sadrzaj'), bmRead);
MainForm.Re.Clear;
MainForm.Re.Line.LoadFromS tram(s);
Accept := MainForm.Re.FindText(FindW hat, 0, Length(MainForm.re.Text), []) <> -1;
finally
s.Free;
end;
end;
Can anybody help me?
--------------------------
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(aD
s: TStream;
begin
s := TStream.Create;
try
s := aDataSet.CreateBlobStream(
MainForm.Re.Clear;
MainForm.Re.Line.LoadFromS
Accept := MainForm.Re.FindText(FindW
finally
s.Free;
end;
end;
Can anybody help me?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.