C
Clay
To All:
I have an existing ms access 2000 application that I sync multiple databases
with.
In the sync1 function below I am syncing the 0102.mdb file with my main
hub.mdb database.
My question is can I use a text file that lists all the databases I want to
sync with?
I am not an efficient coder so please excuse my ignorance...but could I
change the line...
Call synchronizedbs(hub, "\\pe2600\jobs\0102\Dbase\0102.mdb", 2).....to
Call synchronizedbs(hub, "c:\text-file-list.txt", 2)...and
text-file-list.txt just has a list of paths to different databases...like
\\pe2600\jobs\0102\Dbase\0102.mdb
\\pe2600\jobs\0104\Dbase\0104.mdb
\\pe2600\jobs\0110\Dbase\0110.mdb
\\pe2600\jobs\0111\Dbase\0111.mdb
and the synchronizedbs function would loop thru all the paths listed in the
text file....
Both functions are listed below for reference.....
Anyway thanks for any input and please excuse my lack of coding skills...
Thanks
Clay
Public Function sync1()
Dim hub As String
hub = "p:\apps\database\jobs_databases\hub.mdb"
Call synchronizedbs(hub, "\\pe2600\jobs\0102\Dbase\0102.mdb", 2)
End Function
Sub synchronizedbs(strdbname As String, strsynctargetdb As String, _
intsync As Integer)
Dim dbs As Database
Set dbs = DBEngine(0).OpenDatabase(strdbname)
Select Case intsync
Case 1 'synchronize replicas (bidirectional exchange).
dbs.Synchronize strsynctargetdb, dbRepImpExpChanges
Case 2 'synchronize replicas (export changes).
dbs.Synchronize strsynctargetdb, dbRepExportChanges
Case 3 'synchronize replicas (Import changes).
dbs.Synchronize strsynctargetdb, dbRepImportChanges
Case 4 'synchronize replicas (Internet).
dbs.Synchronize strsynctargetdb, dbRepSyncInternet
End Select
dbs.Close
End Sub
I have an existing ms access 2000 application that I sync multiple databases
with.
In the sync1 function below I am syncing the 0102.mdb file with my main
hub.mdb database.
My question is can I use a text file that lists all the databases I want to
sync with?
I am not an efficient coder so please excuse my ignorance...but could I
change the line...
Call synchronizedbs(hub, "\\pe2600\jobs\0102\Dbase\0102.mdb", 2).....to
Call synchronizedbs(hub, "c:\text-file-list.txt", 2)...and
text-file-list.txt just has a list of paths to different databases...like
\\pe2600\jobs\0102\Dbase\0102.mdb
\\pe2600\jobs\0104\Dbase\0104.mdb
\\pe2600\jobs\0110\Dbase\0110.mdb
\\pe2600\jobs\0111\Dbase\0111.mdb
and the synchronizedbs function would loop thru all the paths listed in the
text file....
Both functions are listed below for reference.....
Anyway thanks for any input and please excuse my lack of coding skills...
Thanks
Clay
Public Function sync1()
Dim hub As String
hub = "p:\apps\database\jobs_databases\hub.mdb"
Call synchronizedbs(hub, "\\pe2600\jobs\0102\Dbase\0102.mdb", 2)
End Function
Sub synchronizedbs(strdbname As String, strsynctargetdb As String, _
intsync As Integer)
Dim dbs As Database
Set dbs = DBEngine(0).OpenDatabase(strdbname)
Select Case intsync
Case 1 'synchronize replicas (bidirectional exchange).
dbs.Synchronize strsynctargetdb, dbRepImpExpChanges
Case 2 'synchronize replicas (export changes).
dbs.Synchronize strsynctargetdb, dbRepExportChanges
Case 3 'synchronize replicas (Import changes).
dbs.Synchronize strsynctargetdb, dbRepImportChanges
Case 4 'synchronize replicas (Internet).
dbs.Synchronize strsynctargetdb, dbRepSyncInternet
End Select
dbs.Close
End Sub