I have a routine that copies all the tables of a database into a pre-existing backup database named with the day of the month. With DAO, the following routine copies all the tables in a database to the backup database (specified by WhereFile):
For Each tbl In CurrentDb.TableDefs
If tbl.Attributes = 0 Then
DoCmd.CopyObject WhereFile, tbl.Name, acTable, tbl.Name
End If
Next
(I am writing programs in Access 2000, using Windows XP.)
Is there a way to do the same thing with ADO, with similar simplicity? I consulted faq705-3859 which apparently accomplishes the task, but I'm surprised that what DAO can do with such brevity, ADO must do with an entire chapter of code. Thank you.
For Each tbl In CurrentDb.TableDefs
If tbl.Attributes = 0 Then
DoCmd.CopyObject WhereFile, tbl.Name, acTable, tbl.Name
End If
Next
(I am writing programs in Access 2000, using Windows XP.)
Is there a way to do the same thing with ADO, with similar simplicity? I consulted faq705-3859 which apparently accomplishes the task, but I'm surprised that what DAO can do with such brevity, ADO must do with an entire chapter of code. Thank you.