Lotus Notes FAQ Visit Our Sponsor!

Can you add a database to the replicator page?

From Jason Collier:

Sub Click(Source As Button)

Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesUIDatabase
Dim replica As NotesDatabase
Dim dbLookUp As NotesDatabase

Const LookupServer = "servername"
Const LookupDb = "databasename.nsf"
Set dbLookUp = session.GetDatabase( LookUpServer, LookUpDb )
'set the values of the replication

Set replica = dbLookUp.CreateReplica( "", "databasename.nsf" )

'Add Local and Server Icons to Workspace and Replicator Tab
Call workspace.OpenDatabase( LookUpDb.Server , LookUpDb.filename)
Set db = workspace.CurrentDatabase
Call workspace.OpenDatabase( "" , LookUpDb.filename)
Set db = workspace.CurrentDatabase


Msgbox("Replica database created for: "+ LookUpDb)

End Sub


Applies to Notes Versions: 4 4.5 4.6 5 6
Last Modified: May 29, 2002