How is TZMetadata supposed to work?
Posted: 03.07.2013, 13:44
Hello
I am trying to get the metadata of tables by using a TZSQLMetadata. The environment is Firebird 2.1, Delphi XE2, Zeos 7.0.3.
MetadataType is set to mdColumns.
I have two issues with this setup:
When I want to query the columns for a table UV_VERGLEICHE by setting TableName to UV_VERGLEICHE, I also seem to get the columns for a table UV_VERGLEICHE_TARIFE in the same database. Is this a bug or a feature?
The second problem is, that I try to find all fields of the data type NUMERIC for getting precision and the decimal digits. If a field is declared NUMERIC(12,3) TZSQLMetaData returns NUMERIC for the field TYPE_NAME, as expected and also the correct values for COLUMN_SIZE and DECIMAL_DIGITS. But for fields declared as NUMERIC(5,2), it returns INTEGER for the field TYPE_NAME, the precision is empty (as it should be for an integer, but not for numeric) and the DECIMAL_DIGITS field is 2.
Is all this the way it should work? or is it supposed to work in another way?
Best regards,
Jan Baumgarten
I am trying to get the metadata of tables by using a TZSQLMetadata. The environment is Firebird 2.1, Delphi XE2, Zeos 7.0.3.
MetadataType is set to mdColumns.
I have two issues with this setup:
When I want to query the columns for a table UV_VERGLEICHE by setting TableName to UV_VERGLEICHE, I also seem to get the columns for a table UV_VERGLEICHE_TARIFE in the same database. Is this a bug or a feature?
The second problem is, that I try to find all fields of the data type NUMERIC for getting precision and the decimal digits. If a field is declared NUMERIC(12,3) TZSQLMetaData returns NUMERIC for the field TYPE_NAME, as expected and also the correct values for COLUMN_SIZE and DECIMAL_DIGITS. But for fields declared as NUMERIC(5,2), it returns INTEGER for the field TYPE_NAME, the precision is empty (as it should be for an integer, but not for numeric) and the DECIMAL_DIGITS field is 2.
Is all this the way it should work? or is it supposed to work in another way?
Best regards,
Jan Baumgarten