Adding group to newly created mail file

All,I am creating a new mail file through LotusScript. That is working perfectly, but when I try to add the Admin group in the ACL, it says I cannot open the database. Below is the code:

Dim mailDb As New NotesDatabase(“MyServer”,“MyDatabase”)

Dim acl As NotesACL

Dim entry As NotesACLEntry

Set acl = mailDb.ACL

Set entry = acl.CreateACLEntry ( “Admin”, ACLLEVEL_MANAGER )

Call acl.Save

When I am debugging, I cannot get past the line where I Dim mailDB. Does anyone have any ideas/suggestions? Any help would be appreciated.

Subject: Adding group to newly created mail file

This code opens the existing db and sets its ACL. Why not set the ACL when creating the db initially? Why not add the [Admin] entry in the mail template ACL?

If the code you posted runs with the authority of someone already in the ACL with Manager access, then it should be able to do its thing. If not, it won’t be able to. Again, I’d suggest getting the Admin entry into the ACL when you create it in the first place, preferably via the entry in the template ACL.

Subject: Perhaps:

Dim mailDb As New NotesDatabase(“CN=MyServer/O=MyOrg”,“mail\MyDatabase.nsf”)