Hi
I am using the code below to get a handle to a notesdatabase.
When the mailfile can not be opened I can catch the error with the if statement.
But when the id that is used does not have the right access to open the database
an error is raised and the code stops at the Set mailDb line and goes into the
error handler. Is there a way to catch this kind of error so that the code can
continue to the next mailfile?
Set mailDb = s.GetDatabase ( personmailfileserver , personmailfilepath )
If mailDb Is Nothing Then
lotusscript code
End If
Subject: Opening a database whit no access rights
Sure… use On Error Resume Next (see Designer help for example or this forums… tons of postings). On Error Resume tells program execution to continue with the next statement after the statement that generates the error, instead of specifying an error-handling routine that executes when the error occurs.
Subject: RE: Opening a database whit no access rights
Hi
I have an errorhndler already. But I want to catch only this error to resume next. All other errors should not resume.
Subject: RE: Opening a database whit no access rights
On Error 4060 Goto
I think 4060 is the correct error number but may be 4000
Subject: RE: Opening a database whit no access rights
You could catch the specific error with this code
On Error THENUMBEROFTHEERROR Goto ERRORHANDLER
Subject: Opening a database whit no access rights
First off, why are you using the name of a famous actor and composer? By the way, Belafonte is spelled with one “L”. I usually ignore people on this forum who use names of TV show characters or celebrities.
Why don’t you try this approach…
Set mailDB = New NotesDatabase(personmailfileserver, personmailfilepath)
If mailDB.IsOpen = False Then
lotusscript code
End If
Ken
Subject: RE: Opening a database whit no access rights
Ken,
Sometimes people really do have a name in common with a celebrity. I’m not saying that Harry is using a pseudonym, but I do know a Sharon Stone and I work with someone named Tom Jones… it isn’t out of the question. Your last name is Collins - do you have any relatives named Phil? See what I mean?
The ones that I find humorous are people who name themselves Script Goddess or something of that nature then have a question about a simple task in LotusScript.
Smiles,
Trish