Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Strange "WHERE 'c' <> 'c'"

edited June 2003 in End User
Environ: RB Ent 7.02, Delphi 6, IBObjects, Firebird on Red Hat 7.3

Delphi code:

.....
1: ReportX.Template.DatabaseSettings.Name := 'SomeReport';
2: ReportX.Template.LoadFromDatabase;
3: [Timer]
4: AutoSearchFields[0].SearchExpression := '1234';
5: [Timer]
6: Print;

39 seconds pass between Timer[3] and Timer[5];

Looking at the monitor of database traffic, I find that during that
time, the following statement is being executed for EACH of the 13
tables that are in the report (dataview/pipeline):

SELECT * FROM [TABLENAME] WHERE 'c' <> 'c'

It looks like a way to extract metadata (?). Who? Why?

Anybody know what is going on? The big problem, of course, is that it
takes forever (45 seconds) to run a report the first time. After the
first one, e.g., we come back to the same place in the application and
run the same report, it takes about 2 seconds.


TIA,


Dennis McFall

Comments

  • edited June 2003
    This is code that is in your Dade plugin. It is used to get info about the
    tables and fields of a database when you connect to it. If there is an
    easier way to get this info from the database, then you can change the code
    in the plugin to do this without firing such a query. Is there is a better
    way that you know of?

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    Jim Bennett (Digital Metaphors) wrote:

    Jim:

    Thanks for the information. (Sorry if I used the wrong word,"strange."
    :) I just meant "mysterious.").

    IBOBjects has a SchemaCache property in the Connection, but I have never
    understood how it works. I might try to see if that would have
    anything to do with this issue.

    dm
This discussion has been closed.