Solved

DB Filtering BLOB (RTF) Fields

Posted on 2004-04-14
4
322 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 22

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 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