LotusScript - Best way to reference database on a cluster?

For example, a Domino cluster has two servers: Server1/ACME and Server2/ACME.Server1/ACME is down.

The user clicks a button.

Will this code failover to Server2?

Dim db As NotesDatabase

Set db = New NotesDatabase( “Server1/ACME”, “sales.nsf” )

Or must I write it this way?

Dim db As New NotesDatabase( “”, “” )

Call db.OpenWithFailover( “Server1/ACME”, “sales.nsf” )

Is there a best practice?

Subject: LotusScript - Best way to reference database on a cluster?

Assuming they’re clicking a button from an application on the same server (which could be either server of course), get the current server and use that:

dim currentdb as notesdatabase

set currentdb = s.currentdatabase

set db = new notesdatabase(currentdb.server, “Sales.nsf”)

hth

Dan

Subject: RE: LotusScript - Best way to reference database on a cluster?

In this case, the button is on a 3rd server that is not part of this cluster. db.Server is not an option.

Subject: RE: LotusScript - Best way to reference database on a cluster?

How do I get a db.Openwithfailover to open as a UI Document? Users are in a current.database (thier mailbox), they click on an action button to open another file ie.

Dim session As notesSession

Dim currentdb As notesdatabase

Set currentdb = session.currentdatabase

Dim db As New NotesDatabase

REM because a User Interface db (uidb) does not work with OpenWithFailover so I must use a db first.

Set db = New notesdatabase (currentdb.server, “Resource.nsf”)

Call db.Openwithfailover(currentdb.server, “Resource.nsf”)

** At this point, how do I set db to become a NotesUIDatabase? Because db.OpenView says this is not a member of OpenView. But a notesUIDatabase is a member of OpenView

Call NotesUIDatabase.OpenView(“Reservations By Date”, ,True)