Hi everyone,
I've been stuck with this problem all day, may be someone can help
Scenerio:
1. I have three database A, B, C
-- A is on my hard-drive
-- B is the production database
-- C is the backup of the production database
2. database A feeds database B by importing tables
3. every month the tables in C are replace with the lastest used table from B (copy tables from B to C before feeding B)
Problem:
I have been working on automating this process using VB codes, but i m yet to figure out how to copy tables from B to C without opening the B or C database. I was hoping this codes would do but nothing happens when i tried...see below
My last resort is to do filesystem.copy B, C but these database are so big that it takes about 30 minutes to copy the entire database. SO, PLEASE HELP!!!!!
kiwuji
Trial 1
DBEngine.OpenDatabase(DestDBName, , False).CreateTableDef Table1, , OpenDatabase(sourceDBName).OpenRecordset(Table1,dbOpenTable)
DBEngine.OpenDatabase(DestDBName, , False).CreateTableDef Table2, , OpenDatabase(sourceDBName).OpenRecordset(Table2, dbOpenTable)
Trail 2
DBEngine.OpenDatabase(DestDBName, , False).CreateTableDef Table1, , sourceTable1, sourceDBName
I've been stuck with this problem all day, may be someone can help
Scenerio:
1. I have three database A, B, C
-- A is on my hard-drive
-- B is the production database
-- C is the backup of the production database
2. database A feeds database B by importing tables
3. every month the tables in C are replace with the lastest used table from B (copy tables from B to C before feeding B)
Problem:
I have been working on automating this process using VB codes, but i m yet to figure out how to copy tables from B to C without opening the B or C database. I was hoping this codes would do but nothing happens when i tried...see below
My last resort is to do filesystem.copy B, C but these database are so big that it takes about 30 minutes to copy the entire database. SO, PLEASE HELP!!!!!
kiwuji
Trial 1
DBEngine.OpenDatabase(DestDBName, , False).CreateTableDef Table1, , OpenDatabase(sourceDBName).OpenRecordset(Table1,dbOpenTable)
DBEngine.OpenDatabase(DestDBName, , False).CreateTableDef Table2, , OpenDatabase(sourceDBName).OpenRecordset(Table2, dbOpenTable)
Trail 2
DBEngine.OpenDatabase(DestDBName, , False).CreateTableDef Table1, , sourceTable1, sourceDBName