Prev | Current Page 1909 | Next

Michael R. Groh, Joseph C. Stockman, Gavin Powell, and Cary N. Prague

"Access 2007 Bible"

Database
???The replica to become new DM:
Dim NewDM as DAO.Database
Dim ws as DAO.Workspace
Set ws = DBEngine(0)
???Open old Design Master in exclusive mode:
Set OldDM = ws.OpenDatabase(OldDMName, True)
???Open database that will become the new Design Master.
???Because we??™re changing the ReplicaID of the new Design
???Master, it must be opened exclusively as well:
Set NewDM = ws.OpenDatabase(NewDMName, True)
???Change the DesignMasterID in the old Design Master
???to point to the ReplicaID in the new Design Master:
OldDM.DesignMasterID = NewDM.ReplicaID
???Now synchronize the changes with the new Design Master:
OldDM.Synchronize NewDM, dbRepImpExpChanges
OldDM.Close
NewDM.Close
End Sub
The current Design Master (if there is one!) must be open before you can change the designated
Design Master. (If the Design Master has been lost through a system failure??”perhaps a hard drive
has gone bad??”the soon-to-be Design Master must be opened in read/write mode so that its status
can be changed.


Pages:
1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921
cms kraków jak zrobic ots 8.5 notepal u2 www.arteriae.pl mapa wzorki