Firebird Metadata

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

Moderators: gto, cipto_kh, EgonHugeist

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

Firebird Metadata

Postby martinrame » 20.06.2008, 20:53

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:

Postby martinrame » 20.06.2008, 21:02

Sorry, my fault.

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

Leonardo


Return to “6.5.1 (alpha) - 6.6.x (beta)”

Who is online

Users browsing this forum: No registered users and 1 guest