Opening a database in lotusscript that is on another server

Hi

I have a LotusScript code in a db on a server. In that code I do a lookup to the names and addressbook on another server. But the lookup only works if I really open the names and addressbook on my workspace. If I dont do that I see a error message in the status bar that the addressbook has not been opened yet.

Does that mean that If I do a lookup from lotuscript to a database on another server, that the database has to be open first?

I open the database in my script like this:

Set dbAdress = ssn.GetDatabase( “servername”, “names.nsf”)

I have also noticed that this problem does not happen in R6 but only in R5.

Regards

Subject: RE: Opening a database in lotusscript that is on another server

Try setting the db object another way, e.g. Set db = New NotesDatabase("BLAH BLAH BLAH…

I find this much more reliable than NotesSession.GetDatabase, especially when combined with an If NotesDatabase.IsOpen test.

Subject: Opening a database in lotusscript that is on another server

Are you trying to run this agent on the front end (via your lotus notes client) or from the back end (via a schedule agent).

Subject: RE: Opening a database in lotusscript that is on another server

Hi

It is not in an agent. The code is in the postopen event of a form.

Subject: RE: Opening a database in lotusscript that is on another server

Are you doing this on the web or on the client? I.e. is the code running on the server or the client? On the server, you need to set up “Trusted Server” security. If you are not sure what I am talking about you will find articles I have written about R6 agents (introducing R6 features and troubleshooing agents in R6) helpful. You will find the articles in archives of LDD or direct links from Agent FAQ. Note: This feature is not restricted to agents, it applies to any code whether in the agent or on the form.