Home > Ask the Domino Experts > Questions & Answers > Open a DB dynamically using LotusScript
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Open a DB dynamically using LotusScript

Andre Guirard EXPERT RESPONSE FROM: Andre Guirard

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site
>
QUESTION POSED ON: 03 September 2003
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 


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts