This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


May 18, 2018, 8:46 PM
20 Posts

Need help LotusScript not able to create/open database on Domino server

  • Category: Mail
  • Platform: Windows
  • Release: 9.0.1
  • Role: Administrator
  • Tags:
  • Replies: 3

Hello Domino Gurus,

I have a user with modified template that runs LotusScript when double clicking an item.  I have condensed this down to just something like the following:

Dim dbName As String

Dim servername As String

servername="SomeDominoServer"

dbName="temp.nsf"

 

Dim db As New NotesDatabase(servername, dbName)

If db.IsOpen() Then

  Print "Opened the database."

Else

  Messagebox "The server is currently unavailable.  Try again later.",48,"Error"

End If

 

When I add agent with same code to my user mailbox it also throws up the message box dialog saying the server is not available.  It is like the user does not have the ability to create and open the database.  I signed the agent to run as a different user, gave this user full rights in ECL, and then added this user to LocalDomainAdmins group and added to the Server configuration document under Security to the Administrators field, sign on behalf...as invoker, can create databases, and then it works.

For the other user though it does not.  I get no security messages on the Domino console, the database does not get created, etc.  No messages as to why.

When logged in as same user I can select File/Application/New and fill in the dialog details and this method will create the database and open it.  LotusScript cannot.

Right now I have requested the users log.nsf and notes.ini for the notes client.  Hopefully something will be in there to help determine why this is not working but any ideas from anyone I would appreciate.

May 19, 2018, 5:39 PM
328 Posts
Existing Server or new?

You stated ' It is like the user does not have the ability to create and open the database. ' - but it sounds to me more like the server cannot be found.

Is this an existing server, or fairly new server?

Is there a connection document in the user's local address book for the server, typically in the format ' SomeDominoServer/Domain'?

Does the connection doc specify a fqdn, or an IP address?

From the notes client, can you 'ctrl-o' and open the server?

In the agent, are you specifying 'SomeDominoServer/Domain', or just 'SomeDominoServer'?

Is ' dbName' located in the data directory or 'SomeDominoServer/Domain'? Or is it located in a subdirectory?

Have you enabled to lotusscript debugger and walked thru the agent? When you hit the line ' If db.IsOpen() ' - does db have a value?

 

May 19, 2018, 11:13 PM
20 Posts
good points, will check

All good points Mark.  Right now those folks are on holiday weekend so I will have to begin checking all that next week.  I will let you know how it goes and what I find by updating here.  Thank you for the input.

May 22, 2018, 5:56 AM
14 Posts
Note "New NotesDatabase" doesn't create database on disk
Some of your statements indicate that you expect the code to create a new database on the server's file system, but the code you posted can't do that, and the user's rights to create databases on the server have no effect on that code.

Quote from Notes and Designer Help:
"using New for a NotesDatabase does not create a new database on disk."

This line:
Dim db As New NotesDatabase(servername, dbName)

Should have one of the following effects:
If the specified database exists on the specified server, and the user running the code has access to the database, get an in-memory object linked to that database. IsOpen will return True;
If the specified database exists on the specified server, and the user running the code doesn't have access to the database, throw an error; or
If the specified database doesn't exist, get an in-memory object not linked to any database. IsOpen will return False.


I'm fairly sure it's not possible for LotusScript to create a new blank database on disk, but it is possible for LotusScript to create a new database on disk from a template, or create a new replica of an existing database.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal