Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help a novice

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi,

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.

Thanks.
 
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.




Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!
 
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.

Example:

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.



 
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.

Leslie



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top