Hi everybody, I keep getting an error when I try to open a database using the New method. The error reads “Cannot open databases on machines other than the server running your program (servername!!\quickplace\etc…)”
My guess is that the !! is what is causing the error, but I have no idea how to get rid of it. The code where I try to open the database is as follows:
Dim s As New NotesSession
Dim db As NotesDatabase
Set db = s.CurrentDatabase
Dim newdb As NotesDatabase
Dim ServerName As NotesName
Dim ServerCN As String
Set ServerName = New NotesName(db.Server)
ServerCN = Lcase(ServerName.Common)
Set newdb = New NotesDatabase(ServerCN,“/quickplace/myname/myroom.nsf”)
I tried using Msgbox so that I could see what ServerCN contains and it displays the server name without the !! but for some reason, at that last line, the !! get into the name.
Any thoughts on how to fix this?
Thanks in advance,
Carlos Dubon
Subject: Database not showing up correctly
try changing this:
ServerCN = Lcase(ServerName.Common)
to this:
ServerCN = Cstr(Lcase(ServerName.Common))
Subject: Database not showing up correctly
See if this makes any difference:
Dim s As New NotesSession
Dim db As NotesDatabase
Set db = s.CurrentDatabase
Dim newdb As NotesDatabase
Set newdb = New NotesDatabase(db.Server,“quickplace\myname\myroom.nsf”)
Hope that helps.
Subject: Database not showing up correctly
Well, I tried using both of those suggestions but still no luck.
However, when I use the db.Server, I get a different error message that reads “Database /quickplace/myname/myroom.nsf has not been opened yet”.
Subject: RE: Database not showing up correctly
Hi,
Maybe you have not enough ACL to open the target DB?
HTH
Daniel
Subject: RE: Database not showing up correctly
Hey everybody, thanks for the help, I finally got it to work. What I did was use the .open command instead of using New.
The line looks like:
Call newdb.Open(db.Server, “quickplace\myname\myroom.nsf”)
instead of using
Set newdb = New NotesDatabase(ServerCN, “/quickplace/myname/myroom.nsf”)
Apparently, I indeed needed the db.Server after all. Also, I had to get rid of the / in front of quickplace, and switch all my / to . That did the trick.
Thanks again, I’m so relieved.