Subject Re: [ib-support] Re: Altering a procedure with an invalid FOREIGN66 reference
Author Raymond Kennington
"Alexander V.Nevsky" wrote:
>
> --- In ib-support@y..., Raymond Kennington <progsol@c...> wrote:
> > I have a database with a SP that contains a SELECT join with an
> illegal RDB$FOREIGN66
> > reference; it should be 67.
> [skip]
> > I've tried doing this directly in the BLR for the procedure in the
> RDB$PROCEDURE table and
> > am informed that the type of BLR expected is 4 but it found 98.
> >
> > What should I do?
>
> Try to:
> 1. Create empty (begin exit; end) procedure with the same input and
> output parameters as this one
> 2. Copy it's BLR onto BLR of wrong procedure

Committing the change still gives:
Invalid BLR version, 4 expected, found 98.

> 3. Drop both

Same message if attempt to drop it before attempting to commit.

> 4. Create new correct procedure
>
> Don't forget check dependendencies on damaged procedure from
> another ones before dropping it and, if they exists, alter them with
> commented call and back again after creation of correct. Make all this
> in exclusive access to database and don't forget about commits.
> Perhaps you will be forced to disconnect/connect in any point due to
> metadata cashing.
>
> Best regards, Alexander V.Nevsky.

Thanks.
Raymond.
--
Raymond Kennington
Programming Solutions
W2W Team B