Solved

Open External Notes Database

Posted on 2004-10-06
4
186 Views
Last Modified: 2013-12-18
Hi Everyone.

I have this code :

Sub UpdRecs()
      
Dim session1 As New NotesSession
Dim session2 As New NotesSession

Dim db1 As NotesDatabase
Dim db2 As New NotesDatabase("U-APPS/KAIT", "MEMBERS.NSF")
      
On Error Goto ErrorHandler

Set db1 = session1.CurrentDatabase
Set db2 = session2.????????????????      

TheEnd
Exit Function
      
ErrorHandler:
Messagebox Trim$ ( Str( Err ) ) & ":" & Error$, MB_OK, "Invalid Action"
Print Trim$ ( Str( Err ) ) & ":" & Error$
Resume TheEnd
      
End Sub

Now I need to open an external database called MEMBERS.NSF so I could extracts records from it. I've already created a view inside MEMBERS called fmMEM_Mon that have all the information I need to export. What should I put instead of the question marks ? I tried and tried, and everytime I just get more confused. How could I reference an external database and a view inside it within current database ?

Many thanks in advance.

Kindest Regards.
0
Comment
Question by:Faraj1969
[X]
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
  • 2
4 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 12235188
Set db2 = session2.getdatabase(db1.server,"Members.nsf")
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 250 total points
ID: 12235203
dim db1 as notesdatabase
dim db2 as notesdatabase
dim view2 as notesview
dim ss as new notessession

set db=ss.currentdatabase
Set db2 = ss.getdatabase(db.server,"Members.nsf") 'Since both are in same server. If it is local then instead of db.server use "".

set view2=db2.getview("yourbviewInExternalDB")


And if ur thinking u want to display a view (which is in another database) in current database , then this cannot be done.

0
 

Author Comment

by:Faraj1969
ID: 12235300


I appreciate it madheeswar.

Cheers.

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 12235490
Just some info: there is only one NotesSession object in memory, just as there is only one NotesUIWorkspace object. The variables session1 and session2 would "point" to the same object, and reflect the same properties etc.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus notes forward mail problem 5 435
Mobile Iron iphone stop receiving new mails 6 1,433
Add a cc field to email code 3 123
Domino Server 2 84
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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