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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBLink links to the wrong replica

Status
Not open for further replies.

msao

Programmer
Sep 25, 2005
3
US
I have 3 replicas of a database in three countries (A, B, C), each having exactly the same path on each server.

I send an email to to users in countries A, B, C ... providing a DBlink to the replica in A (replica A contains info not in B or C that users need to access upon release of the db). However, some users (those who do not have the db in their workspace yet) are directed to the replica residing in either B or C.

How can I force the DBlink to link them to replica A?

I used the following code in attaching the link to the memo...

Set db = New NotesDatabase(<server A>, <db filepath>)
Set dblink = New NotesRichTextItem(memo, "Body")
Call dblink.AppendDocLink(db,"","")
 
There is no easy way to make a db link to a particular server. Notes client will open the last known replica of the database regardless of what server was used for creating the link.
The only sure solution is to create a LotusScript button which explicitly specifies the server name. It's easy to include such button manually by simply pasting it into Body field, but adding such button using background script will be more difficult, but possible. You can add pre-created button using AppendRTItem method.

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Call workspace.OpenDatabase _
( "server1", "reports\plan2.nsf", "","", False, False )
End Sub


"server1" value can also be put as an additional field to the mail document, thus making the button re-usable for future mailings:
Call workspace.OpenDatabase _
( doc.tmpservername(0), "reports\........






/Andrei Kouvchinnikov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top