Tony,

> problem gone now.  Next question though, anyone know how to list tables in
an
> Access 97 database?  My thinking so far was to use the DAO3.5 dll
directly....

Here's some code I use to extract table names from Access database.
Database1 is a TDatabase and List1 is a TListbox. Set the Path parameter in
Database1 to the full path of the Access table. cbSystemObjs is true if I
want system tables returned as well.

  Database1.CloseDataSets;
  Database1.Close;
  List1.Clear;
  Database1.Params.Text := 'PATH=' + sfName.FileName;
  Database1.DatabaseName := ExtractFileName(sfName.FileName);
  Database1.Connected := True;
  Database1.Session.GetTableNames(Database1.DatabaseName,
    '', False, cbSystemObjs.Checked, List1.Items);
  for x := 0 to List1.Items.Count - 1 do
    List1.Selected[x] := True;

Laurence Bevan
Master Business Systems Ltd


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to