Subject | Re: [IBO] How to know if a field is COMPUTED BY on the server ? |
---|---|
Author | Sylvain Planchon |
Post date | 2005-04-30T07:38:19Z |
Thanks a lot Dimitry !
I'll prefer a more "sexy" solution but if it works... ;-)
Sylvain.
Dmitry Beloshistov a écrit :
I'll prefer a more "sexy" solution but if it works... ;-)
Sylvain.
Dmitry Beloshistov a écrit :
>Hello, Sylvain!
>You wrote to <IBObjects@yahoogroups.com> on Fri, 29 Apr 2005 17:07:42 +0200:
>
> SP> In order to have this information, I'm creating a TIBOQuery, setting
> SP> "SELECT FIRST 1 * FROM TABLENAME" as the SQL and opening it.
>
>You can call only Prepare method - should be more fast.
>
> SP> The problem is that I'm making INSERTs on these tables and there's
> SP> got problems when trying to write into a field that is computed by
> SP> the server. I would like to know if a field is a COMPUTED BY field.
> SP> Is it possible easily ?
>
>AFAIK, TIBOQuery not give extended information about fields (its may be
>wrong - I`m don`t use TIBOxxx components).
>
>1) Get Field domain name from RDB$RELATION_FIELDS as:
>
> SELECT RDB$FIELD_SOURCE FROM RDB$RELATION_FIELDS
> WHERE UPPER(RDB$FIELD_NAME)=?FieldName
> AND UPPER(RDB$RELATION_NAME)=?FieldName
>
>2) Get field is computed on server as:
> SELECT RDB$COMPUTED_SOURCE FROM RDB$FIELDS
> WHERE RDB$FIELD_NAME=?DomainName // from step 1
>
>3) You can union this two SQL in one ;)))
>
>If computed source is NULL or '' - this field is not computed be server.
>
>WBR,Dmitry Beloshistov AKA [-=BDS=-]
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>