.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: Open method
1. This script opens the first database found on the current computer (local machine if the script runs on a workstation, server if the script runs on a server).
Dim directory As New NotesDbDirectory( "" )
Dim db As NotesDatabase
Set db = directory.GetFirstDatabase( DATABASE )
Call db.Open( "", "" )
2. This LotusScript agent opens each database in the AddressBooks property of NotesSession. The NotesDatabase variable, book, must be treated as a Variant to be used as an AddressBooks element.
Sub Initialize
Dim s As New NotesSession
Forall book In s.AddressBooks
book.open "", ""
Messagebox book.Title,, "Address book"
End Forall
End Sub
3. This Visual Basic code opens each database in the AddressBooks property of NotesSession. The NotesDatabase variable, book, must be treated as a Variant to be used as an AddressBooks element.
Private Sub Open_Click()
Dim s As New NotesSession
s.Initialize
For Each book In s.AddressBooks
book.Open
List1.AddItem (book.Title)
Next
End Sub
4. This script opens the SALES.NSF database on the server HongKong.
Dim db As New NotesDatabase( "", "" )
Call db.Open( "HongKong", "sales.nsf" )
5. This script tests for the existence of a specific database. You have a script that archives documents from one database to an archive database. If the archive database doesn't exist, the script creates it; otherwise, the script opens it.
Dim archiveDb As New NotesDatabase( "", "" )
Dim originalDb As New NotesDatabase( "", "product.nsf" )
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
If ( Not ( archiveDb.Open( "", "archive\" & _
originalDb.FileName ) ) ) Then
Set archiveDb = originalDb.CreateCopy( "", "archive\" _
& originalDb.FileName )
Call archiveDb.GrantAccess( "Ivan Ash", ACL_MANAGER )
End If
See Also
Open method
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents