Principle: First establish the LINK table of the target table in the MDB file, then copy all or part of a table in the manner of the MDB database locally, delete the LINK table. At this point, the database's backup has been completed, this method does not pass the loop, speed is also ideal.
Implementation: First, it is assumed that an ORACLE data source is set in the ODBC. The database service is named LINKDATABASE, DSN is ORAODBC, the username is Administrator, password password, import table oracle_table into c: /TEMP.MDB MDB_DBASE, intermediate step link The name of the table is Templink
DIM DB AS DAO.DATABASE 'Database Object, DAO3.6 DIM TBLINK AS DAO.TABEDEF' Table Object 'Open Backup Target MDB SET DB = OpenDatabase ("C: /TEMP.MDB") "Start Creating a Link Table Set TBLINK = dB.CreateTableDef ( "TempLink") 'setting the string coupling tbLink.Connect = "ODBC; DATABASE = LinkDataBase; UID = Administrator; PWD = Password; DSN = oRAODBC" tbLink.SourceTableName = "LinkDataBase.Oracle_Table" dB.TableDefs.Append TBLINK 'Copy Table (Canada) DB.Execute "Select * INTO MDB_Database from Templink" delete link table DB.TableDefs.delete Templink
This is completed