Subject Fb 2.1 and Domains in Procedure Parameters
Author Martijn Tonies
Hey,

I'm trying to use Domains in Procedure Parameters like this:

ALTER PROCEDURE DOMAIN_TEST (
D D_BETWEEN4AND10 default 4,
D2 SmallInt,
DE D_EMAIL DEFAULT 'test')
returns (
MON D_MONEY,
MON2 Numeric(18,4)) AS
begin
exit;
end

But I get a message:
Dynamic SQL Error SQL error code = -204 can not define a not null column
with NULL as default value invalid clause --- 'defaults must be last'

If I remove "default 4", it works fine. The domain has no default defined.

If I try this:

MON2 Numeric(18,4) default 2) AS

Then I get:
Dynamic SQL Error SQL error code = -104 Token unknown - line 7, char 22
default

The " default 'test' " clause seems to work fine.

Are defaults allowed on domains? Or am I running into a few problems with
weird messageS?


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