Wozu brauchst Du eine Datasource?
Delphi-Quellcode:
procedure TForm1.fillCBTables(cb: TComboBox);
var Tables: TStringList;
i, count: integer;
begin
if Assigned(
db)
and db.Connected
then
begin
cb.Items.Clear;
trans.Active := true;
dataset.Active := false;
dataset.SelectSQL.Text := '
SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE '
+'
(RDB$RELATION_NAME NOT STARTING ''
RDB$''
)'
+'
AND (RDB$RELATION_NAME NOT STARTING ''
TMP$''
) '
+'
AND (RDB$RELATION_NAME NOT STARTING ''
MON$''
) '
+'
ORDER BY RDB$RELATION_NAME';
dataset.Open;
while not dataset.EOF
do
begin
cb.Items.Add(dataset.Fields[0].AsString);
dataset.Next;
end;
trans.Commit;
end;
end;
Ungetestet, sollte aber funktionieren, solange ich keinen groben Denkfehler gemacht habe.