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

Problem with D7 + Firebird after updating to RB 15.05

edited October 2014 in General
Hi.

I was using RB 15.04 and, after updating to RB 15.05, I'm having a problem with Firebird
reports.

When viewing a simple table report, I'm getting "dbExpress error: Unknown Error Code
'65535'". Doing a debug, I saw that before this error occurs, it's giving a prior message
"Sql Server Error: no current record for fetch operation".

I think the message is caused by a query that is done just after the query for getting
table data:

"SELECT TFERPRI_1.DATFER, TFERPRI_1.DESCRI
FROM TFERPRI TFERPRI_1
ORDER BY TFERPRI_1.DATFER"

After the select above, another query is executed:

"SELECT 0, '', '', A.RDB$RELATION_NAME, A.RDB$INDEX_NAME, B.RDB$FIELD_NAME,
B.RDB$FIELD_POSITION, '', 0
, A.RDB$INDEX_TYPE, '', A.RDB$UNIQUE_FLAG
, C.RDB$CONSTRAINT_NAME, C.RDB$CONSTRAINT_TYPE
FROM RDB$INDICES A
, RDB$INDEX_SEGMENTS B
FULL OUTER JOIN RDB$RELATION_CONSTRAINTS C ON A.RDB$RELATION_NAME =
C.RDB$RELATION_NAME AND C.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
WHERE (A.RDB$SYSTEM_FLAG <> 1 OR A.RDB$SYSTEM_FLAG IS NULL)
AND (A.RDB$INDEX_NAME = B.RDB$INDEX_NAME)
AND (A.RDB$RELATION_NAME = UPPER('TFERPRI'))
ORDER BY RDB$INDEX_NAME"


It seems that this query above is causing the error.


Doing a simple modification on FROM clause and it seem's to work fine:

"SELECT 0, '', '', A.RDB$RELATION_NAME, A.RDB$INDEX_NAME, B.RDB$FIELD_NAME,
B.RDB$FIELD_POSITION, '', 0
, A.RDB$INDEX_TYPE, '', A.RDB$UNIQUE_FLAG
, C.RDB$CONSTRAINT_NAME, C.RDB$CONSTRAINT_TYPE
FROM RDB$INDEX_SEGMENTS B
, RDB$INDICES A
FULL OUTER JOIN RDB$RELATION_CONSTRAINTS C ON (A.RDB$RELATION_NAME =
C.RDB$RELATION_NAME AND C.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY')
WHERE (A.RDB$SYSTEM_FLAG <> 1 OR A.RDB$SYSTEM_FLAG IS NULL)
AND (A.RDB$INDEX_NAME = B.RDB$INDEX_NAME)
AND (A.RDB$RELATION_NAME = UPPER('TFERPRI'))
ORDER BY RDB$INDEX_NAME"

=> Just exchange the table order ("A" and "B") on FROM clauses.


Hope that this help you to reproduce the problem.

Environment:
D7 with DbExpress, Firebird (2.1 and 2.5 tested), Win7 and WinXP tested.


Thank's in advance,

Laércio

Comments

  • edited October 2014
    Hi Laercio,

    This is not a known issue.

    Please send a simple example (perhaps using DBDEMOS) that demonstrates
    this issue to us in .zip format and we'll take a look at what might have
    changed since RB 15.04.

    Send the example to support@digital-metaphors.com.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.