Solved

DB Filtering BLOB (RTF) Fields

Posted on 2004-04-14
4
326 Views
Last Modified: 2010-04-05
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?
0
Comment
Question by:Grmek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 23

Accepted Solution

by:
Ferruccio Accalai earned 500 total points
ID: 10826816
Sorry, but Blob filtering is not allowed....
from Paradox help:

Filters are similar to queries. Most of the operators that work in a query can also be used in a filter. The differences in the kinds of expressions you can use are

The @ wildcard operator is not allowed in a filter.
      The .. wildcard operator is not allowed in numeric or date fields in filters. Furthermore, this operator is allowed after the filter condition, but not before it. For example, you can type view.. to filter for all values that contain the letters "view" (either upper or lower case) followed by any other letters. This filter returns the values View, Viewing, viewed, viewable, and so on. Using the .. wildcard is the only way to define a case-insensitive filter.

Example elements are not used in filters. However, you can refer to one field from another. See Either/or conditions for more information.
      Calculated fields are not used in filters. Furthermore, math operations can be performed only on SQL tables.
--->!!!      You cannot use BLOB fields in filters, or filters in BLOB fields.   !!!<------
      Summary expressions (like COUNT>5) are not allowed in filters.
      In filters, parentheses can be used to nest conditions.

The comma functions as the AND operator for top-level conditions such as >200, <300. However, in a filter, the AND operator must be used instead of a comma to express more complicated conditions such as (>100 AND <200) OR (>300 AND <500). The general rule is that you must use AND when the condition is within parentheses.
      The LIKE, AS, and SET operators are not used in filters, but the TODAY and BLANK operators are allowed.
      Any operators that change data do not function in filters.

Checks are not used in filters, and records are displayed as if a CheckPlus is set on every field.
      Although filters cannot have multiple lines such as those used in queries, the equivalent to multiple lines is the OR keyword.
      The % (equivalent to mod) operator is supported in filters but not in queries. This operator only works on SQL tables.
      The operator precedence is slightly different than queries. See Operator precedence in filters for more information.

In all other respects, the types of expressions you can use in filters are the same as those used in queries. See About queries for more information on query expressions.

Live query views

You can use a query to return a data set that you can edit. The edits you make to this live query view are also made to the table you queried.
See About live query views for information on live query views.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question