Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>you'll need to use the notesDbDirectory.OpenDatabaseByReplicaID(rid$) method. To get the NotesDbDirectory, you can use the getDbDirectory method of the session</p> <pre><code>Set notesDbDirectory = notesSession.GetDbDirectory( serverName$ ) </code></pre> <p>So you can use the code below to get a database by replicaID.</p> <pre><code>public static string[] GetLotusNotesHelpTickets() { NotesSession session = new NotesSession(); session.Initialize(Password); Set notesDBDirectory = session.GetDbDirectory("NTNOTES1A") // 85256B45:000EE057 = NTNOTES1A Server Replica ID NotesDatabase database = notesDBDirectory.OpenDatabaseByReplicaID("85256B45:000EE057") string SearchFormula = string.Concat("Form = \"Call Ticket\"" , " &amp; GroupAssignedTo = \"Business Systems\"" , " &amp; CallStatus = \"Open\""); NotesDocumentCollection collection = database.Search(SearchFormula, null, 0); NotesDocument document = collection.GetFirstDocument(); string[] ticketList = new string[collection.Count]; for (int i = 0; i &lt; collection.Count; ++i) { ticketList[i] = ((object[])(document.GetItemValue("TicketNumber")))[0].ToString(); document = collection.GetNextDocument(document); } document = null; collection = null; database = null; session = null; return ticketList; } </code></pre> <p>Unfortunately, this only solves half of your problem. I know you'd rather just tell Notes to fetch the database with a particular replicaID from the server closest to the client, just like the Notes Client does when you click on a DBLink or Bookmark. However, there is (or appears to be) no way to do that using the Notes APIs.</p> <p>My suggestion is to either loop through a hard-coded list of potential servers by name, and check to see if the database is found (the OpenDatabaseByReplicaID method returns ERR_SYS_FILE_NOT_FOUND (error 0FA3) if the database is not found). If that's not a good option, perhaps you can easily expose the servername in an admin menu of your app so it can be changed easily if the server name changes at some point. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload