Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot open databases on machines other than the server running your..

Status
Not open for further replies.

jaydave6

Programmer
Jan 2, 2002
13
IN
Hi,
I am getting 'Cannot open databases on machines other than the server running your program ' error while executing following code in vb.

Dim domSession As New Domino.NotesSession
Dim domDatabase As New Domino.NotesDatabase

Call domSession.InitializeUsingNotesUserName("user 1", "user123")
Set domDatabase = domSession.GetDatabase("Server1/Training", "u1.nsf")

I am executing this code from the "Server 2/Training". My mail file resides on "Server 1/training". Thus I am accessing mail files from the other machine than the mail server.

How to open databases on machines other than the server running my program using InitializeUsingNotesUserName() method ?

I have made Server 2/Training as the Secondary Domino Server of Server 1/Training, thus Server 2/training 's NAB contains same users information as NAB of Server 1/Training. Thus above code allows me to initialize the session with the users registed with Server 1/training.
 
You are not allowed to access a database on another server from inside the script, supposedly as a security issue.

The easiest way to get around this is to make a replica of the your mail file on Server 2/Training. As long as both databases are on the same server the code works fine.

In general, you need to run agents on the server where the production data resides, although you usually want to create replicas or copies of this data for testing the code on some other server.

Mike P.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top