LOTUSSCRIPT/COM/OLE CLASSES
Examples: Accessing database properties
1. This example prints the values for the database properties that are built-in data types.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Messagebox "Title: " & db.Title & Chr(10) _
& "File name: " & db.FileName & Chr(10) _
& "Path name: " & db.FilePath & Chr(10) _
& "Replica ID: " & db.ReplicaID & Chr(10) _
& "Size: " & db.Size & Chr(10) _
& "Created: " & Chr(10) _
& "Last modified: " & db.LastModified
If db.IsOpen Then
Messagebox "Database is open"
Else
Messagebox "Database is not open"
End If
Forall manager In db.Managers
Messagebox "Manager: " & manager
End Forall
Messagebox "Categories: " & db.Categories
If db.TemplateName <> "" Then
Messagebox "Template name " _
& db.TemplateName
End If
If db.DesignTemplateName <> "" Then
Messagebox "Design template name" _
& db.DesignTemplateName
End If
If db.IsFTIndexed Then
Messagebox "Is full-text indexed " _
& db.LastFTIndexed
End If
Messagebox "Current access level: " _
& db.CurrentAccessLevel & Chr(10) _
& "Percent used: " & db.PercentUsed & Chr(10) _
& "Server name: " & db.Server & Chr(10) _
& "Size limit: " & db.SizeQuota
Messagebox "FolderReferenceEnabled: " _
& db.FolderReferencesEnabled
Messagebox "IsDirectoryCatalog: "_
& db.IsDirectoryCatalog
Messagebox "Maxsize: "_
& db.Maxsize
End Sub
2. This example prints the name of each view in the database. A NotesView object is defined and set to each value in the Views property. The name is a property of the view object.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim views As Variant
Set db = session.CurrentDatabase
views = db.Views
Forall v In views
Messagebox( v.Name )
End Forall
End Sub
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary