Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DB Filtering BLOB (RTF) Fields

Posted on 2004-04-14
4
Medium Priority
?
330 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

721 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