Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to send email button to make database replica

1 view
Skip to first unread message

Bryan.Sc...@walsworth.com

unread,
Oct 10, 2000, 3:00:00 AM10/10/00
to
I need to make a button in an email that will do the following:

1. Check to see if a database is already on the user's workspace.
2. If not, make a replica of the database.
3. Add the replica to the user's replicator page.

I have written code that I think does this. It is as follows:

Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As New NotesDatabase( "", "" )
Dim gallerydb As NotesDatabase
Dim replica As NotesDatabase

If db.OpenByReplicaID( "", "8625650D0054D97A" ) Then
' Gallery Exists
Messagebox "The Gallery Database is already on your
workspace.",MB_OK, "Exists"
Call Workspace.AddDatabase( "" , "gallery.nsf" )
Else
' Gallery Doesn't Exist
Messagebox "The Gallery Database is not on your
worksapce. Press OK to replicate it to your workspace.",
MB_OKCANCEL, "Doesn't Exist - Creating Replica"
Set gallerydb = session.GetDatabase
( "North_Dial_Up/Walsworth Publishing Company", "gallery.nsf" )
Set replica = gallerydb.CreateReplica
( "", "gallery.nsf" )
Call Workspace.AddDatabase( "" , "gallery.nsf")
End If

I think that this is working, but I am not sure that it is adding it to
the replicator page.

Something else that I would like to be able to do is send out a button
that will check to see the last time a user replicated a database.
Anyone know how to do that?

Bryan


Sent via Deja.com http://www.deja.com/
Before you buy.

0 new messages