Ich habe es so gelöst:
Delphi-Quellcode:
Procedure TSyncForm.get_columns(
Const TableName:
String);
Var
i : Integer;
Begin
Screen.Cursor := crHourGlass;
ListBox1.Items.Clear;
Try
With ADOQuery
Do
Begin
SQL.Text :=
Format('
SELECT *' + #10 +
'
FROM %s' + #10 +
'
WHERE 1 <> 2', [TableName]);
PrePared := True;
Open;
If Not Eof
Then
Begin
For i := 0
To pred(FieldCount)
Do
ListBox1.Items.Add(Fields[i].DisplayLabel);
End;
Close;
End;
Finally
Screen.Cursor := crDefault;
End;
End;
... nicht schön, aber selten