ReportBuilder 7.04/IBObjects 4.3.Aa/Firebird 2.1.3 Problem
Hi,
I know this is an old version of ReportBuilder, but I'm hoping someone will
be able to point me in the right direction with a problem I'm having
migrating a legacy application from Interbase 7.1, to Firebird 2.1.3.
When we use the Query Wizard of Report Builder 7.04, and click the Finish
button after adding a table, we get an ISC error about unknown columns. This
is happening because the query that is being run to extract the data is
using table aliases that are no longer allowed in Firebird so the the strict
alias checking. If I alter the Firebird configuration to allow relaxed alias
checking, then the query runs ok. The issue is that we don't want to rely on
this configuration option as it may be removed in a later version of
Firebird.
Its a long shot, but I'm hoping someone may have experience of fixing this
problem. To behonest I don't know if its something in ReportBuilder that
needs changing, or the IBO pipeline, or if its something that can't be fixed
without moving to the later versions of ReportBuilder or IBObjects.
I know this is an old version of ReportBuilder, but I'm hoping someone will
be able to point me in the right direction with a problem I'm having
migrating a legacy application from Interbase 7.1, to Firebird 2.1.3.
When we use the Query Wizard of Report Builder 7.04, and click the Finish
button after adding a table, we get an ISC error about unknown columns. This
is happening because the query that is being run to extract the data is
using table aliases that are no longer allowed in Firebird so the the strict
alias checking. If I alter the Firebird configuration to allow relaxed alias
checking, then the query runs ok. The issue is that we don't want to rely on
this configuration option as it may be removed in a later version of
Firebird.
Its a long shot, but I'm hoping someone may have experience of fixing this
problem. To behonest I don't know if its something in ReportBuilder that
needs changing, or the IBO pipeline, or if its something that can't be fixed
without moving to the later versions of ReportBuilder or IBObjects.
This discussion has been closed.
Comments
ReportBuilder will use the daIBO.pas plugin to obtain all information about
the DB you are accessing. Take a look at the TdaIBOSession.GetTableNames,
and TdaIBODataSet.GetFieldsForSQL routines for how this is currently done.
One or both of these routines may need to be changed to meet the needs of
the new DB.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for your reply. I have looked at the source files, but there is
nothing jumping out at me that would require further investigation. I have
included a very simple example of the SQL being executed that fails.
SELECT ATTACHEMENT_1.ATTACHMENTID,
ATTACHMENT_1.TITLE,
ATTACHMENT.RDB$DB_KEY
FROM ATTACHMENT, ATTACHMENT_1
WHERE ('c' <> 'c')
I understand this is failing due to the strict alias checking done in
Firebird 2.x, and is something to do with IBO adding the RDB$DB_KEY field
into the selection. I don't understand however why the table qualifier for
that field is not using the defined alias instead of the actual table name.
As I mentioned previously, this maybe something that I need to take up with
IBO rather than Report Builder, but I'm not sure.
Grateful for any further pointers you may have.
I see... the ATTACHMENT.RDB$DB_KEY is causing the issue. This seems to be a
IBO specific addition as I do not see where it is explicitly added in the RB
code. You may try contacting IBO support for some insight on how to solve
this issue. Perhaps one of the "KeyLinks" properties can be changed in code
in the IBO plugin to prevent the problem.
My suggestion would be to get this working in Delphi without ReportBuilder
first, then using the same settings for the IBOQuery in the plugin.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Not sure if this helps, but I have experienced problems with RDB$DB_KEY
which s automatically added by IBO components unless you define an
explicit database field in the IBO SQL property "Keylinks".
When creating tables I always have a field for a unique record number
("Lineno"). Each record has an autoincrement integer in this field.
By entering "Lineno" in the Keyfield property of the IBO SQL, the errors
referred to disappear.
HTH.
Mike Hickman
Thanks for the pointer. I'll have a look into it. I'm also in the process of
setting up a test machine so I can try the latest build of IBObjects, but I
feel this may cause further issues as this is a legacy application and I
dread to think what new problems will arise from upgrading IBO. Wish me luck