Q

Open a DB dynamically using LotusScript

I want to be able to open a database dynamically using LotusScript. I wish to access the user's home server and then access the DB by a replica ID instead of using the path, as we use different paths at different servers. Do you have any sample script that can help me do this?
Assuming that by "home server" you mean the user's mail server, something like this should work:
Dim ses As New NotesSession 
Dim ws As New NotesUIWorkspace 
Dim mailServer As String 
mailServer = ses.GetEnvironmentString
("MailServer", True) 
If mailServer = "" Then 
Msgbox "Please change to a location 
where you have access to 
a server mail file.", 0, "title" 
Exit Sub 
End If 
Dim appDB As New 
NotesDatabase("", "") 
If appDB.OpenByReplicaID
(mailServer, "00001111222233334444
5555666677778888") Then 
Call ws.OpenDatabase(mailserver, 
appDB.FilePath) 
End If 

This was first published in October 2003

Dig deeper on LotusScript

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.uk

Close