GetTableNames - Access Provider

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
johnbitner
Posts: 22
Joined: Thu 10 Sep 2009 16:18
Location: United States

GetTableNames - Access Provider

Post by johnbitner » Thu 29 Jul 2010 13:44

When calling GetTableNames using the Acess provider I get an "Abstract Error". Using 3.0.0.10.

I can call this with MS SQL database. Does this not working on Access?
If not does anyone know how to get a table list with access database with or without unidac?

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 02 Aug 2010 11:17

Hello

I executed the following code successfully:

Code: Select all

var
  i: integer;
  str: string;
  TableNames: TStringList;
  MyConnection: TUniConnection;
begin
  MyConnection := TUniConnection.Create(self);
  MyConnection.ProviderName := 'Access';
  MyConnection.Database := '...'; // set correct database 

  TableNames := TStringList.Create;

  try
    MyConnection.Open;
    MyConnection.GetTableNames(TableNames, true);
    for i := 0 to TableNames.Count - 1 do
      str := str + TableNames[i] + #13;
    ShowMessage(str);
  finally
    TableNames.Destroy;
    MyConnection.Destroy;
  end;
end;
Try to create a new application and execute the same code. Please provide me the result of executing this code. If this code is working correctly then please modify this code to reproduce your issue.

Post Reply