Subject | No current record for fetch operation |
---|---|
Author | RB Smissaert |
Post date | 2008-09-24T21:54:02Z |
Using FB 1.5 and some users get the error:
No current record for fetch operation
When running this query:
SELECT
R.RDB$RELATION_ID,
RF.RDB$RELATION_NAME,
RF.RDB$FIELD_NAME,
T.RDB$TYPE_NAME,
RF.RDB$FIELD_POSITION,
F.RDB$FIELD_LENGTH,
RF.RDB$SYSTEM_FLAG
FROM
RDB$RELATION_FIELDS RF
LEFT JOIN RDB$FIELDS F ON (RF.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME)
INNER JOIN
RDB$TYPES T ON (F.RDB$FIELD_TYPE = T.RDB$TYPE) INNER JOIN
RDB$RELATIONS R ON (RF.RDB$RELATION_NAME = R.RDB$RELATION_NAME)
WHERE
T.RDB$FIELD_NAME = 'RDB$FIELD_TYPE'
I understand that this can be caused by FB having problems with the left
join before the inner joins and the solution should be
to re-write the SQL, so the left join comes after all inner joins. The
trouble is that I can't do that in the above SQL.
Would changing the left join to a right join always avoid this problem?
SELECT
R.RDB$RELATION_ID,
RF.RDB$RELATION_NAME,
RF.RDB$FIELD_NAME,
T.RDB$TYPE_NAME,
RF.RDB$FIELD_POSITION,
F.RDB$FIELD_LENGTH,
RF.RDB$SYSTEM_FLAG
FROM
RDB$FIELDS F
RIGHT JOIN
RDB$RELATION_FIELDS RF ON (F.RDB$FIELD_NAME = RF.RDB$FIELD_SOURCE)
INNER JOIN
RDB$TYPES T ON (F.RDB$FIELD_TYPE = T.RDB$TYPE) INNER JOIN
RDB$RELATIONS R ON (RF.RDB$RELATION_NAME = R.RDB$RELATION_NAME)
WHERE
T.RDB$FIELD_NAME = 'RDB$FIELD_TYPE'
RBS
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: 24 September 2008 22:20
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: Advice on component set for FB2.1
many times questions about the MDO stability since it's atgged as BETA.
Henrique said that for some years there is no major bug found on the
code, and that it's tagged as BETA just because it has not enough
documentation, and that the desire is to remove the BETA tag only when a
good documentation is available, but you know, documentation is hard to
write, so it's still carrying the BETA tag.
I did not used it personally (because I still use D4, I have BDS 2006
but it's too heavy !)
No current record for fetch operation
When running this query:
SELECT
R.RDB$RELATION_ID,
RF.RDB$RELATION_NAME,
RF.RDB$FIELD_NAME,
T.RDB$TYPE_NAME,
RF.RDB$FIELD_POSITION,
F.RDB$FIELD_LENGTH,
RF.RDB$SYSTEM_FLAG
FROM
RDB$RELATION_FIELDS RF
LEFT JOIN RDB$FIELDS F ON (RF.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME)
INNER JOIN
RDB$TYPES T ON (F.RDB$FIELD_TYPE = T.RDB$TYPE) INNER JOIN
RDB$RELATIONS R ON (RF.RDB$RELATION_NAME = R.RDB$RELATION_NAME)
WHERE
T.RDB$FIELD_NAME = 'RDB$FIELD_TYPE'
I understand that this can be caused by FB having problems with the left
join before the inner joins and the solution should be
to re-write the SQL, so the left join comes after all inner joins. The
trouble is that I can't do that in the above SQL.
Would changing the left join to a right join always avoid this problem?
SELECT
R.RDB$RELATION_ID,
RF.RDB$RELATION_NAME,
RF.RDB$FIELD_NAME,
T.RDB$TYPE_NAME,
RF.RDB$FIELD_POSITION,
F.RDB$FIELD_LENGTH,
RF.RDB$SYSTEM_FLAG
FROM
RDB$FIELDS F
RIGHT JOIN
RDB$RELATION_FIELDS RF ON (F.RDB$FIELD_NAME = RF.RDB$FIELD_SOURCE)
INNER JOIN
RDB$TYPES T ON (F.RDB$FIELD_TYPE = T.RDB$TYPE) INNER JOIN
RDB$RELATIONS R ON (RF.RDB$RELATION_NAME = R.RDB$RELATION_NAME)
WHERE
T.RDB$FIELD_NAME = 'RDB$FIELD_TYPE'
RBS
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: 24 September 2008 22:20
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: Advice on component set for FB2.1
> The second question is: Is the MDO set acceptable? I had not evenI know personally the Main MDO developer (Henrique Meira), I had saw
> heard of it until your post.
>
many times questions about the MDO stability since it's atgged as BETA.
Henrique said that for some years there is no major bug found on the
code, and that it's tagged as BETA just because it has not enough
documentation, and that the desire is to remove the BETA tag only when a
good documentation is available, but you know, documentation is hard to
write, so it's still carrying the BETA tag.
I did not used it personally (because I still use D4, I have BDS 2006
but it's too heavy !)
> I may also want to check out FIB+. I think it is used by some peopleI use FIBPlus has no problem with it (FB 0.9, 1.0, 1.5, 2.0 and 2.1)
> that have been in this business a while.
>
> Thanks[Non-text portions of this message have been removed]
> Jack
>