Solved

Open External Notes Database

Posted on 2004-10-06
4
184 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
  • 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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…
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 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