[bug_fixed] GetFieldNames on ZConnection
Posted: 07.03.2007, 22:51
Your ZeosLib DBO Version: 6.6.1
The IDE you are using: Delphi
Version (and maybe patchlevel) of the IDE: 7
The database you are using: Firebird
Version of the database: 1.5
Used protocol: firebird-1.5
[hr]Error description and post
I sugest you to put a function to get the fieldnames directly from connection
like gettablenames
somethin like this
TZConnection....
interface
implementation
The IDE you are using: Delphi
Version (and maybe patchlevel) of the IDE: 7
The database you are using: Firebird
Version of the database: 1.5
Used protocol: firebird-1.5
[hr]Error description and post
I sugest you to put a function to get the fieldnames directly from connection
like gettablenames
somethin like this
TZConnection....
interface
Code: Select all
public
procedure GetFieldNames(const TablePattern: string; List: TStrings);
Code: Select all
procedure TZConnection.GetFieldNames(const TablePattern: string; List: TStrings);
var
Metadata: IZDatabaseMetadata;
ResultSet: IZResultSet;
begin
CheckConnected;
List.Clear;
Metadata := DbcConnection.GetMetadata;
ResultSet := Metadata.GetColumns('', '', TablePattern, '');
while ResultSet.Next do
List.Add(ResultSet.GetStringByName('COLUMN_NAME'));
end;