LSS NotesDatabase.open quesrtion

With Lotusscript I try to open a database.

The opening fails.

Is there any chance to find out why?

( ‘the database does not exist’ or ‘no access rights’ … )

Subject: Have you tried trapping the error?

Use On Error and see what value is returned

Subject: LSS NotesDatabase.open question

Thanks four your reply

Sure, but ‘On Error’ works only if an error occurs during opening.

LSS NotesDatabase.open returns either True or False. ‘False’ means the database could not be opened. My question was if there is a way to find out the reason why the database could not be opened.

I just found a workaround by using the CAPI-function NSFDbopen, which returns a specific return code which tells me the reason why the database could not be opened.

Subject: Use New NotesDatabase()

I think I read somewhere that it is recommended in most cases to use set db = New NotesDatabase(server,filename) instead of db.Open(servername,filename).I don’t remember the exact reason, but I have been doing it that way for many years.