Subject | Re: [IBO] Retrieve default values from a table's metadata |
---|---|
Author | Jason Wharton |
Post date | 2001-01-09T06:02:45Z |
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
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@...>
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
>
>
>
>