Subject Re: [firebird-support] UDF problems IB5.6 --> FB1.03
Author Helen Borrie
At 12:45 PM 26/01/2004 +0000, you wrote:
>Hi Helen
> > > > Yes: these functions involve data types that changed between IB 5.6
> > >IB 6. It affects a lot of the functions in that lib. Long ago, the
> > >FreeUDFLib was updated to reflect that.
>I've tried the new library and it doesnt help. As far as I can see the
>Addmonth etc functions havn't been changed.
>I am very confused.
>The migration documentation seem to say that if I want to use Firebird 1.03
>with a database from IB5.6 I should restore it under FB

after backing it up -t[ransportable] using IB 5.6 gbak.

> and it will be in
>dialect 1. Also that I should use the IB version of Gds32.dll.

The migration documentation was written for IB 6, not Firebird. Use the
gds32.dll for the version of Firebird that you have. The IB 6 gds32.dll
was "fixed" so that it would not connect to an ODS 9 database. Firebird
fixed the bug that necessitated that step and the Firebird gds32.dll can
connect to a 5.6 db. Check the ODS attribute on the Characteristics tab of
IB_SQL and make sure you really do have an ODS 10 database.

Do check the system directory and look at the property sheet of the
gds32.dll version that's there. It should have the same build number (or
very close) as the Fb ibserver.exe. If it's not the right one, try to
rename it. If the OS won't let you do that, then you know that something
you have already done has loaded the wrong one. You might have to reboot
in safe mode to swap in the correct gds32.dll.

>I made a special directory on the server and copied in IB_SQL and gds32.dll.
>When I try to open the database I just get 'blob error'.

Dunno about that one. Trace the SQL and find out what statement caused that.

>If I open it from EMS on my machine (same gds32.dll as copied to the server)
>then I can get in. I can view my udfs but I cant drop them because I get
>unassigned code'. I cant drop the ones with dependencies because they
>report the UDFs not defined. I cant define the udfs because it reports that
>they already exist.

It seems to be a bit fraught with anomalies. I'd want to make sure that
everything is using the same (correct) client library, first off. I'd work
my way through those dependencies (sp's that use the UDFs?) and drop them
and then the UDFs, maybe even back in 5.6, before having another go with
the known-correct libraries.

>If I open the database on the server with a version of IB_SQL that I copied
>into the FB bin directory then I can view the udfs ( the DATE fields have
>changed to TIMESTAMP). I can apparently drop F_ADDMONTH, but when I create
>it I get the error 'unable to drop F_ADDYEAR' - which is crazy.

You won't be able to drop it if you have a SP or trigger that's dependent
on it.

>I cant believe this is supposed to be so difficult - help appreciated ;-)

5.6-to-Firebird isn't a minor step and things do need doing in the right
order. As well as the IB 6 migration stuff you need to study the Fb 1.0
release notes pretty closely because there *are* differences.