Recent

Author Topic: GetTableNames cannot work!  (Read 3429 times)

Brian

  • Newbie
  • Posts: 3
GetTableNames cannot work!
« on: May 28, 2007, 08:24:46 pm »
I am trying to get the table names in a msaccess.  However once executing gettablenames, I get error message of "Project raise exception class 'EDatabaseError'."

The following is my code,
 
Code: [Select]
procedure TForm1.FormCreate(Sender: TObject);
begin
  try
    with ODBCConnection1 do
    begin
      Connected := True;
      GetTableNames(ComboBox1.Items, false);
    end;
  except
    MessageDlg('Invalid MSAccess File!', mtError, [mbOK], 0);
  end;
end;


Please help why I cannot make it work!!!

 

TinyPortal © 2005-2018