Subject Re: [firebird-support] Change field type to domain
Author Martijn Tonies
Hello Rick,

> I want to change certain field types in existing tables to be a
> Domain. The Domain is the same type as the field type now, i.e.
> NUMERIC(18,3) existing and I want to use a Domain that is defined as
> NUMERIC(18,3).
>
> When I try to alter the table (using DBWorkbench) I get "error
> 335544351 Unsucessful metadata update Column ? in table ? is
> referenced in ...procedures".
>
> Is there some way to change the field type to the Domain without
> having to drop and recreate the referenced procedures?

Some people say you can fiddle around with the system tables
to update such a field type if the underlying datatype is the same.
I would not do that though.

The easiest thing is to "comment" the procedures involved.

Are there many procedures depending on this field? Check the
"dependencies" for the table and you'll know.

If you alter your procedures like this:
alter procedure myproc
<in/out parameters>
AS
begin
/*
all old code in comments
*/
end


Then the dependencies will be gone. Afterwards, change your
procedures back to their normal code.


Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com