Subject Re: Retrieve default values from a table's metadata
Author Jay Johannes
Thanks for your quick reply. :).
This property does not seem to do the trick for me it seems.

I need to get the value in my 'hand' and put it in a seperate column
amongst some other field definitions like name, type etc. That way
the
user can leave the true default value untouched or just enter a
different value at convenience.

--- In IBObjects@egroups.com, "Jason Wharton" <jwharton@i...> wrote:
> There is a property called GetServerDefaults that you can use to
tell IBO to
> figure out what you have on the server as defaults and to apply
them
to the
> client when an insert is done through a dataset.
>
> HTH,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: <johannes@w...>
> To: <IBObjects@egroups.com>
> Sent: Monday, January 08, 2001 10:49 PM
> Subject: [IBO] Retrieve default values from a table's metadata
>
>
> > On table create I can specify a default value. That's cool.
> > However, how can I retrieve just those default values for
reference.
> > This does make sense if one is to write highly generic
applications.
> >
> > Yes, I can do the following...
> >
> > select rdb$field_name
> > , rdb$default_value
> > from rdb$relation_fields
> > WHERE (rdb$field_name not starting with 'rdb$')
> > and rdb$relation_name = 'ATableName'
> >
> > ...which returns rdb$default_value(s) as blob of subtype 2 (blr).
> >
> > The simple question, however, is: How do I extract the default
> > value(s) from the blob?
> >
> > I did have a look at the blr example, but it did not really hint
> > anything in the above regard. Any help is much appreciated.
> >
> > Thanks and cheers
> >
> > Johannes
> >
> >
> >
> >