Write a program to create databases

Posted on 2005-03-29
Medium Priority
Last Modified: 2013-12-18
How would i go about writing a small notes app to automate the createion of databases?

i need to create databases of the "ms office library" template on the server MAIL_PR with the filename xxxx.nsf (eg 1234.nsf) and the description "xxxx - description" in one of any subdorectory (currently there are bout 6) in the domino\data\databases direcotry.

quite easy really from a codeing point of view, but i havn't a clue where to start with notes designer - any pointers would be greatly appreciated.


Question by:pelsonrose
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 46

Accepted Solution

Sjef Bosman earned 501 total points
ID: 13651620
For your purpose, it might be best to create an agent. The call you should look into is the CreateFromTemplate method.
LVL 24

Assisted Solution

HemanthaKumar earned 501 total points
ID: 13652430
Open your designer and write this script either in a agent or action button

Dim template As New NotesDatabase( "SERVERNAME", "doclbm50.ntf" )
Dim nDb As NotesDatabase
Set nDb = template.CreateFromTemplate( "SERVERNAME", "FILE_PATH_NAME", True )

LVL 63

Assisted Solution

Zvonko earned 498 total points
ID: 13652442
May I ask what would be the advantage of some program creating databases instead of doing it manualy?
I mean, you cannot allow the user to run an Agent to create a database on server if he is not also already allowed to create the database manualy.
Scanning the server subdirectories and placing one database in every subdirectory does not make to much sense to me.
If you have more then twenty subdirectories in on AppDir below notesdata, then perhaps it would make sense.
But keep in mind that you have to hardcode many parts and test them before allowing users to do a night fly.
In the same time you could create the databases by hand.

For more details look at this example:


Author Comment

ID: 13652962
For every customer we get we create an office type database, and then make a mailin rule so ppl can file relavent data there. I have to set up these databases and am sick of creating batches of 20 datbases in the same place in one go. I want to automate the process so all i have to do create a txt file (or a csv) and have the machine do all the work, while i take the morning off ;-)
LVL 46

Expert Comment

by:Sjef Bosman
ID: 13653136
Then create those databases once, leave them empty, and whenever a new customer arrives, copy these new databases to the customer's area in Notes. Then adapt the ACL of one database and copy it to the others using the Administrator client. DOn't do the copy outside Notes (using the O/S copy functionality) because that would create replica databases. The overall functionality is about the same, it might be easier to implement, using only NotesDatabase.CreateCopy calls.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question