Firebird Metadata

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
martinrame
Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina
Contact:

Firebird Metadata

Post by martinrame »

I'm trying to extract the list of tables from an Firebird 2.0.3 database using TZSqlMetadata and this code:

AConnection is a reference to the connected database (it's connected, don't worry!).

Code: Select all

AMetadata := TZSQLMetadata.Create(nil);
  AMetadata.Connection := AConnection;
  AMetadata.MetadataType := mdTables;
  AMetadata.Open;
  while not AMetadata.Eof do
  begin
      lMyList.Add(AMetadata.TableName);
    AMetadata.Next;
  end;
  AMetadata.Close;
AMetadata.Free
The while loop iterates aproximately the number of database objects, I think it's correct, the problem is AMetadata.TableName is equal to '' (empty) for all tables, also when I look for AMetadata.ProcedureName is empty and all AMetadata properties.

¿It's a bug? ¿can you help me?

Leonardo.
martinrame
Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina
Contact:

Post by martinrame »

Sorry, my fault.

I was using AMetadata.TableName instead of AMetadata.FieldByName('TABLE_NAME').AsString;

Leonardo
Post Reply