Page 1 of 1

TSmartQuery UpdatingTable List

Posted: Fri 18 Sep 2009 08:41
by flyy
hi, I'm using Delphi 2007.

after I write a Sql into SmartQuery, when i clicked UpdatingTable property from object inspector, it finds table list in this sql and shows this list to me in comboBox list.

How can the SmartQuery find this list, I want to get this list too, Is there any procedure or funtion which get this list? how can I get this list.

Posted: Mon 21 Sep 2009 08:17
by Plash
You can use the following code:

Code: Select all

var
  TablesInfo: TCRTablesInfo;
  i: integer;
  Name: string;
begin
  TablesInfo := TDBAccessUtils.GetIRecordSet(OraQuery1).TablesInfo;
  for i := 0 to TablesInfo.Count - 1 do
    Name := TablesInfo[i].TableName;
end;
Add CRAccess to USES.

Posted: Wed 23 Sep 2009 06:38
by flyy
Thanks a lot, this is exactly what i need. It works fine.

and as I understand to use this code, dataset must be activeted or this code returns null, but I solve my problem. thanks again