Jump to content
Sign in to follow this  
Jacek Laskowski

FireDAC and read table metadata

Recommended Posts

I use Firebird and I use domains in databases. 

CREATE TABLE RESOURCE
(
  IDRESOURCE                  D_PRIMARY_KEY,
  IDCUSTOMER                  D_FOREIGN_KEY NOT NULL,
  LASTUSED                    D_DATETIME,
  RESOURCEIDENTIFIER          D_VARCHAR120,
  FRIENDLYRESOURCENAME        D_VARCHAR250);

 

How to use Firedac to read the domain names used for the columns in the table?

I try use TFDMetaInfoQuery but without success (ExtendedMetadata enabled).

 

ps.   How to use TFDMetaInfoQuery.MetaInfoKind with value set to mkTableTypeFields? There is no description in the documentation and TFDMetaInfoQuery does not return anything.

 

Share this post


Link to post

You can't use mkTableTypeFields MetaInfoKind with Firebird - in fact most adapters it seems don't implement this MetaInfoKind (ODBC seems to).  If you look in FireDAC.Phys.IBMeta in the TFDPhysIBCommandGenerator.GetSelectMetaInfo method, you'll see that type has no SQL generated to return data - hence the empty dataset.

 

I don't think you'll be able to obtain your domain names using TFDMetaInfoQuery directly. You would need to query the underlying Firebird tables directly to retrieve that information.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×