Subject Re: [ib-support] Re: Using domains in stored procedures
Author Martijn Tonies
Hi,

I might be wrong - but I think Oracle supports not domains, but something
like:

create procedure ... ( in/out/inout myname table.column%type )

Right?

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."

> Both Oracle and SQL Server supports this behaviour, so it seems to be
> possible. Probably the constraints/defaults assigned to the domain
> are checked when adding a value to the database.
>
> /Pär Fahlén
> --- In ib-support@y..., "Martijn Tonies" <m.tonies@u...> wrote:
> > Hi,
> >
> > > Well, thanks for the rapid answer even though it was not really
> what
> > > I wanted to hear. Any idea why this is not possible? I mean, it is
> > > one of the good things with domains (in other products). Anyway,
> > > thanks again.
> >
> > Most probably because there's more to a domain that simply a
> datatype.
> >
> > A Domain can have more attributes, like:
> > - NOT NULL
> > - DEFAULT [value]
> > - CHECK [search condition]
> >
> > How would these be used as parameters for a stored procedure? What
> > if you don't supply one? Or supply one as NULL while the domain is
> > defined as NOT NULL?
> >
> > Martijn Tonies
> > InterBase Workbench - the developer tool for InterBase and Firebird
> > http://www.interbaseworkbench.com
> >
> > Upscene Productions
> > http://www.upscene.com
> >
> > "This is an object-oriented system.
> > If we change anything, the users object."
> >
> >
> > > /Pär Fahlén
> > >
> > > --- In ib-support@y..., "Thomas Steinmaurer" <ts@i...> wrote:
> > > > A short answer. You can't use domains in stored procedures.
> > > >
> > > > Regards,
> > > > Thomas Steinmaurer
> > > > http://www.iblogmanager.com
> > > >
> > > > > -----Original Message-----
> > > > > From: parfahlen [mailto:parfahlen@y...]
> > > > > Sent: Tuesday, May 14, 2002 10:38 AM
> > > > > To: ib-support@y...
> > > > > Subject: [ib-support] Using domains in stored procedures
> > > > >
> > > > >
> > > > > Hi!
> > > > >
> > > > > I would like to use domains when specifying input parameters
> for
> > > > > stored procedures but it doesn't seem to work. I have done
> like
> > > this:
> > > > >
> > > > > create domain id_type as int
> > > > >
> > > > > create procedure sp_test(a id_type)
> > > > >
> > > > > I get the following error :
> > > > > Dynamic SQL Error
> > > > > SQL error code = -104
> > > > > Token unknown - line 1, char 21
> > > > > id_type
> > > > > Statement: create procedure sp_test(a id_type)
> > > > >
> > > > > Is this the way it should be or am I doing something wrong?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > To unsubscribe from this group, send an email to:
> > > > > ib-support-unsubscribe@e...
> > > > >
> > > > >
> > > > >
> > > > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > > > >
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > ib-support-unsubscribe@e...
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>