.
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: Creating a database
1. This example creates a local database named SALES2.NSF. The database is not initialized. This database is useful for storing data programmatically but cannot be used through the Notes UI.
Sub Initialize
Dim db As New NotesDatabase("", "")
If db.IsOpen Then Messagebox "Is Open" Else Messagebox "Not open"
Call db.Create("", "sales2.nsf", True)
If db.IsOpen Then Messagebox "Is Open" Else Messagebox "Not open"
End Sub
2. This example creates a local database named saledisc.nsf based on the Domino template discuss4.ntf and changes the title. Discuss is the database object for the template and db is the database object for the new database. The third argument to CreateFromTemplate inherits design changes.
Sub Initialize
Dim discuss As New NotesDatabase("", "DISCUSS4.NTF")
Dim db As NotesDatabase
Set db = discuss.CreateFromTemplate _
("", "SALEDISC", True)
db.Title = "Sales Discussion Database"
End Sub
3. This example creates a local replica of a database on a server and initializes it.
Sub Initialize
Dim names As New NotesDatabase("MARKET", "SALEDISC")
Dim db As NotesDatabase
Set db = names.CreateReplica("", "SALEDISC")
Messagebox db.Title
If db.Replicate("MARKET") Then
Messagebox "Replication successful"
Else
Messagebox "Replication not successful"
End If
End Sub
4. This example creates a copy of names.nsf.
Sub Initialize
Dim names As New NotesDatabase("", "NAMES")
Dim db As NotesDatabase
Set db = names.CreateCopy("", "NAMESCPY")
End Sub
See Also
Creating and deleting a database
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents