T
Tim
Hi folks,
Could anyone show me the code to check the table exist or not in ADO?
Thanks in advance.
Tim
Could anyone show me the code to check the table exist or not in ADO?
Thanks in advance.
Tim
Tim said:Hi folks,
Could anyone show me the code to check the table exist or not in ADO?
Dirk Goldgar said:Alex and David have answered your specific question, but it occurs to me
to wonder whether you really need to use ADO? If you're working in
Access 2000 or later and you're trying to see whether the table exists
in the current database, you can use the CurrentData.AllTables
collection, or -- unless it's an ADP -- the CurrentDb.TableDefs
collection. The former is a native Access approach, while the latter is
a DAO approach. With either of those collections you could either try
to access the table by name in the collection and trap the error that
occurs if it isn't there, or else loop through the collection checking
each item for a match on the name.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)