IsOpen problem

I am using the following code in an agent

Set NABDB = New NOtesDatabase(“”,“names.nsf”)

If NABDB.isOpen Then

mseeagebox “Databse is opened”

else

messagebox “DB not opened”

end if

when I run this I am getting “DB not opened” message, bu tthe names.nsf is a valid database present in the same server .

Can any one of you tell when this can occur and how to overcome this.

Subject: IsOpen problem

I know that is help is written that if server and filepath are present then the object is open, but that is not always true.After seting database - either throu session or as New I always call db.Open(“”,“”)

Set NABDB = New NOtesDatabase(“”,“names.nsf”)

Call nabDB.Open(“”,“”)

If NABDB.isOpen Then

mseeagebox “Databse is opened”

else

messagebox “DB not opened”

end if

Subject: RE: IsOpen problem

Thanks Elka,

I am opening the DB using

Set NABDB = New NOtesDatabase(“”,“names.nsf”)

So then no need to open the DB,

but “If NABDB.isOpen Then” condition fails.

Subject: IsOpen problem

If your agent is started by User or is called with agent.Run then you are opening that user’s personal AddressBook.If you call agent with agent.RunOnServer - than you will get the server’s NAB. It works OK on my site.

I tried your code (correcting some missspelling) and it gives me that NABDb is open - My

If you want to access the NAB on a server different from local, than you sould write the name of the server.

So what I was trying to say is that sometimes set nabdb with all parameters is not enough. You are loosing nothing if you add

Call nabDB.Open(“”,“”)

after setting it with New or with sesseion.getDatabase.

GoodLuck.

“The owls are not what they seem.”