Operation not allowed...

Matthew Snook

NW Salmon Database
Local time
Today, 19:20
Joined
Apr 19, 2001
Messages
133
I have a replicated database backend. Replication and internet synchronization are working. Now I'm trying to put a button on a front-end form which will initiate the synchronization of the backend.

Using "Database Replication in Microsoft Jet 4.0"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/dbrepjet.asp

and "Implementing Database Replication with JRO"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/jrorep.asp

I copied the following code:

Sub InternetSync(strLocalReplicaPath As String, _
strServerReplicaURL As String)
Dim repLocalReplica As New JRO.Replica

repLocalReplica.ActiveConnection = strLocalReplicaPath

' Synchronize the local replica with the replica on
' the Internet server.
repLocalReplica.Synchronize strServerReplicaURL, jrSyncTypeImpExp, _
jrSyncModeInternet

Set repLocalReplica = Nothing
End Sub

Then I inserted my own filenames into the statement:

InternetSync "c:\CBSDataBase\CBSDataHub.mdb", "fish.server/CBSDataHub.mdb"

When the process reaches the "Synchronize" statement I get the following error: "Runtime Error 3219 - Operation is not allowed in this context."

What is missing? Am I not allowed to initiate synchronization on a separate mdb file?

Thanks,

Matt
 

Users who are viewing this thread

Back
Top Bottom