Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Please help a novice

Please help a novice

Please help a novice


I need an assistance in writing my first lotus notus script.

What I need to do is to open two databases on the same server and loop through the documents of both databases to compare the values.

Can you please give me the example of the declaration section and open statements for two databases.

Any help will be greatly appreciated.


RE: Please help a novice

Try something like this:

Dim db1 as NotesDataBase
Dim db2 as NotesDataBase
Dim doc1 as NotesDocument
Dim doc2 as NotesDocument

Set db1 = New NotesDatabase( "MetroNT4", "names.nsf" )
'MetroNT4 is the server name and names.nsf is the database
set db2 = New NotesDatebase("MetroNT4", "leave.nsf")

Then you will need to set the doc1 and doc2 to the specific documents in the database you want to compare.  If you give a little more information about what you want to compare, I'll give you some more information on how to do the comparison.


There are 10 types of people in the world -
those who understand binary
those who don't!

RE: Please help a novice

Thanks a million for your help.

What I would need to do further is to lookup the value in the first database and update the field in each document of the second database.


str = DbLookup("":"NoCache";Server:Path;"MemberLookup";CHARGE_TRANSIT; "Rollup_Transit"))

Then assign the value of the str to the field of the document from the second database.

RE: Please help a novice

Do you have to update ALL documents in the second database or only specific ones?  what field are you trying to update?  where exactly in the first database does the information come from?  Do you have a view that has all the documents to be searched in it?

This really isn't going to be too difficult from what you've said, I just need some specifics.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close