Subject: Database has not been opened yet - LotusScript error
This error occurs when you try to use a NotesDatabase object in ways that require it to be “open,” and it is not open at that time. The IsOpen property will tell you whether the database is open. See the description of IsOpen for a list of properties that are available when the database is not open.
If you get the NotesDatabase handle from a NotesDBDirectory object or from NotesSession.AddressBooks, it is not open until you call the Open method on it. But if you get the object in another way, for instance using New NotesDatabase, the database is normally opened at the same time.
So, the cause of the problem is the line of code that creates the NotesDatabase object. However, the error doesn’t occur until later on, when you try to use the object in a way that requires it to be open.
Dim dbLookup As New NotesDatabase(dbThis.Server, “resc\lookup.nsf”) ’ problem here: database doesn’t exist.
Set view = dbLookup.GetView(“Keywords”) ’ error occurs here.
Possible causes of the problem are:
There is no such database at the path you specified.
The ID running the code doesn’t have access to open the database.
The database file is damaged somehow and can’t be opened.
…
Use the LotusScript debugger, or insert some debugging output statements, to see the exact values of the strings you’re passing as arguments. Make sure they have the values you expect. If the values are correct, try to open the application manually, from the Notes client menus, using the exact same server name, filepath and Notes userID as was used by the code. The resulting error message should tell the cause of the failure.