Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

With replication can I sync just structures and not the data

Status
Not open for further replies.

sirrodii

Programmer
Jul 15, 2002
8
US
I have a database that I would like to pass on to multiple unrelated users. I intend to provide them updated tables, form and reports but I do not want to pass on any data. I am using incrementing auto numbers on many tables and I want each user to be able to have their own range. I can create the initial (partial) replicas, just fine. The problems apprear when I try to syncronize. My 'master' has my test data and the replicas would have the users own data. I have seen code excerpts mentioning JRO and DAO.Syncronize but I do not seem to have those (Access 2000). Any help would be greatly appreciated.
 
This will probably help you or turn you away from replication.
Implementing replication programmatically

Use Jet and Replication Objects (JRO) if you require programmatic control over the exchange of data and design information among members of the replica set in Microsoft Access databases (.mdb files only). For example, you can use JRO to write a procedure that automatically synchronizes a user's replica with the rest of the set when the user opens the database. To replicate a database programmatically, the database must be closed.

If your database was created with Microsoft Access 97 or earlier, you must use Data Access Objects (DAO) to programmatically replicate and synchronize it.

Microsoft Replication Manager

Microsoft Replication Manager is a full-featured tool for managing replicas, setting synchronization schedules, and viewing members of the replica set. It is available to in the Microsoft Office XP Developer.

You can use Replication Manager as a visual interface to:

Manage a large number of replicas.
Designate Design Masters.

Support laptop users who aren't always connected to a network.
Create replicas.

Easily create replicas of more than one database.
View the connections between members of a replica set.

Set schedules for synchronizing members of the replica set.
Set the properties for replicas.

Troubleshoot errors.
Web server replication

Web server replication is a tool you can use to work on files even when you are no longer connected to a Web server.

Microsoft Office XP users can continue to work on shared documents even when they log off the network. When the Web Publishing feature is installed, a replication mechanism automatically maintains a list of recently opened Web server documents and stores copies of them in a cache on the local hard disk. To add files to the cache, users select a file in Microsoft Windows Explorer, and then use menu options to make the files available offline.

A user can open and edit replicated files while offline. Then, the next time the user logs on to the network, all changes the user has made are automatically replicated to the server. Also any changes that have occurred on the server while the user has been offline are replicated locally.

Note Only Microsoft Internet Explorer 5 or later supports offline caching and replication.
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Thanks for the info. I do not have Office XP I have Office 2000. Can I get the Replication Manager piece? If so how?
I am currently trying to get it to work with DAO, but I am getting a Data Type Conversion error.
Public Function Sync() As Boolean
Dim Master As String
Dim Replica As String
Dim SyncType As Integer
Dim dbs As Object ' As DAO Object gives an error

Master = "C:\ScheduleMaster\ScheduleMaster.mdb"
Replica = "C:\ScheduleMaster\ScheduleReplica.mdb"
MsgBox ("Prepring to sync with " & Replica & ".")
Set dbs = DBEngine(0).OpenDatabase(Master)
SyncType = 2
Select Case SyncType
Case 1 'Synchronize replicas (bidirectional exchange).
dbs.Synchronize Replica, Master
Case 2 'Synchronize replicas (Export changes).
ERROR dbs.Synchronize Replica, Master
Case 3 'Synchronize replicas (Import changes).
dbs.Synchronize Replica, Master
Case 4 'Synchronize replicas (Internet).
dbs.Synchronize Replica, Master
End Select
dbs.Close
End Function
 
The replication manager comes with the office Developers edition. If you don't have the developer edition, you don't have it. It costs about $300.00+.

You are probably getting conversion errors because you don't have a refgerence set to DAO. Add the reference and you will probably compile ok. If you don't know how, from thr VB Editor click tools click references. Search For Microsoft DAo 3.? and click that. Move it as high up the hierarchy as it will go. Then recompile. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Public Function Sync() As Boolean
Dim Replica As String
Dim dbs As Object

Replica = "C:\ScheduleMaster\ScheduleReplica.mdb"
MsgBox ("Prepring to sync with " & Replica & ".")
Set dbs = CurrentDb
' 1 Synchronize replicas (bidirectional exchange)
' 2 Synchronize replicas (Export changes)
' 3 Synchronize replicas (Import changes)
' 4 Synchronize replicas (Internet)
dbs.Synchronize Replica, 2
dbs.Close
End Function

Getting the following error after running for a few minutes.
File sharing locks exceeded. Increase MaxLocksPerFile in registry entry.

Is this an acceptable way to get the database? I was unable to define dbs As DOA or Database or anything like that I get "User defined type not defined".

The database window does not close prior to the sync as it does when I sync from the menu. Is this the lock error? Can I get around it?

Thanks for the help so far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top