OpenNTF.org - Database Info Class
    Advanced
   OpenNTF Code Bin
Edit Document Code By Rating > Code Document
About This Code
Brief Description:
Database Info Class 
Rating:
Rating: 5 , Number of votes: 1 
Contributor:
Davy Vanherbergen 
Category:
Lotusscript 
Type:
API Functions 
Notes Version:
R5.x, R6.x 
Last Modified:
17 Aug 2004 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
The DatabaseInfo class allows you to read/write some database properties.



Supported properties
--------------------------------------
replicaid as string (read)
listInCatalog as variant (read/write)
listInBrowse as variant (read/write)
listInCatalog as variant (read/write)
Title as string (read/write)
TemplateName as string (read/write)
InheritTemplateName as string (read/write)
Categories as string (read/write)


Methods
------------------------------------
save()

Usage / Example
Use "DatabaseInfo"

Sub Initialize

Dim s As New notessession
Dim db As notesdatabase
Dim dbinfo As databaseinfo

Set db = s.currentdatabase
Set dbinfo = New databaseinfo(db.server, db.filepath)

If dbinfo.fileNotFound Then
Print "DB not found"
Exit Sub
End If

'read settings
Print dbinfo.replicaid
If dbinfo.listInCatalog Then Print "db is listed in catalog"
If dbinfo.listInBrowse Then Print "db is listed in browse dialog"
If dbinfo.listInCatalog Then Print "db is listed in catalog"
Print "Title:" + dbinfo.Title
Print "Template:" + dbinfo.TemplateName
Print "Inherit from:" + dbinfo.InheritTemplateName
Print "Categories:" + dbinfo.Categories

'modify settings
dbinfo.listInCatalog = True
dbinfo.listInBrowse = True
dbinfo.Title = "TEST DB"
dbinfo.TemplateName = "TemplName"
dbinfo.InheritTemplateName = "SourceTemplate"
dbinfo.Categories = "cat1"

Call dbinfo.save()


End Sub
Code Attachments
DatabaseInfo.lss (10 Kbytes)
 Comments

No documents found

 Add your comment!