TSmartQuery UpdatingTable List

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
flyy
Posts: 17
Joined: Fri 18 Sep 2009 08:34

TSmartQuery UpdatingTable List

Post by flyy » Fri 18 Sep 2009 08:41

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 21 Sep 2009 08:17

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.

flyy
Posts: 17
Joined: Fri 18 Sep 2009 08:34

Post by flyy » Wed 23 Sep 2009 06:38

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

Post Reply