Page 1 of 1

GetTableNames - Access Provider

Posted: Thu 29 Jul 2010 13:44
by johnbitner
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?

Posted: Mon 02 Aug 2010 11:17
by bork
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.