About This Code
Brief Description:
Notes Database Properties LotusScript Class
Contributor:
Davide Varotto
Notes Version:
R5.x, R6.x
Last Modified:
28 Jun 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
Overview
The DatabaseProperties class has been created to manage Notes databases in small to enterprise-wide domains using LotusScript and C API to set most Database settings on R5/R6 databases that you can set via client notes but you don't manage via LotusScript directly.
Its code has been built/expanded from the various Lotus Script/C API contributions over the years in the forums by many authors such as Normunds Kalnberzins and Rod Whitely as well as the dbdesign stuff by Damien Katz (and expanded dbdesign by Josh Jore).
This class is an extension of the "dbdesign" and a reorganization of the function that you can get in "R5 Database Manager" and my improvment. For the DBDesign a i made a fix in the method that update the document thant contain Template Name/Design Name/Category. Now the string store in the notes document does not contain a garbage Characters.
This class is provide with online Help of every property and method.
Usage / Example
Usage
This database and LotusScript code library are provided "As Is" with NO WARRANTY, and are provided for your educational use only. I accept no responsibility for any damage that this code example or database may cause to your systems.
I am unable to provide ANY SUPPORT for this code
This is an extension of DBDESIGN CLASS created by Damien Katz of Iris Associates, Aug. 1999, altered by Joshua b. Jore of Imation January 2002, altered by Davide Varotto June 2004
This library may be freely distributed.
Please share any fixes or enhancements and send them to davide.varotto@tin.it so I can add it the library.
If you find this library useful, send me a mail message and let me know what you're using it for.
Thanks & Enjoy
Davide Varotto
davide.varotto@tin.it
Copyright
You are free to utilise this code for any purpose. This library may be freely distributed.
Overview
The DatabaseProperties class has been created to manage Notes databases in small to enterprise-wide domains using LotusScript and C API to set most Database settings on R5/R6 databases that you can set via client notes but you don't manage via LotusScript directly.
Its code has been built/expanded from the various Lotus Script/C API contributions over the years in the forums by many authors such as Normunds Kalnberzins and Rod Whitely as well as the dbdesign stuff by Damien Katz (and expanded dbdesign by Josh Jore).
This class is an extension of the "dbdesign" and a reorganization of the function that you can get in "R5 Database Manager" and my improvment. For the DBDesign a i made a fix in the method that update the document thant contain Template Name/Design Name/Category. Now the string store in the notes document does not contain a garbage Characters.
Functions
You can enable/disable or change the name this property in a notes dabase:
Database properties (Basic Tab)
Disable background agents for this database
Allow use of stored forms in this database
Display images after loading
Web Access: Use Javascript when generating Page
Web Access: Require SSL Connection
Database properties (design properties Tab)
Template Name The template name of a database, if the database is a template
Design Template Name The name of the design template from which a database inherits its design.
List In Database Catalog
Show in 'Open Database' Dialog
Do not mark modified documents as unread
Include in Multi Database indexing
Multilingual database
Multilingual database - Default Language Combobox
Multilingual database - Default Region Combobox
Multilingual database - Default Sort Order Combobox
Advanced database properties
Don't maintain unread marks
Document table bitmap optimization
Maintain Last Accessed property
Disable transaction logging
Allow soft deletions
Don't support specialized response hierarchy
Allow more fields in database
Use LZ1 compression for attachment
Limit the size of $Revisions fields
Undelete Expire Time in Hours
Limit the size of $Revisions fields
Replication Setting
Send Tab Do not send deletions made in this replica to other replicas
Other Tab Temporarily Disable Replication
Advanced Function
Get the total size of the full text index in byte of a database
Get the Database ODS version
Hide Design option only disables the Notes client options from looking at a selected database's design elements
Refreshing a design of a database from a server
Design element: Remove (set blank) in every design document Design Tab (Design Source) the property inherit from design template
Design element: disable/remove check in every design document Design Tab (Design Source) the property prohibit design refresh or replace to modify
Limitations are:
Tested with R5 Notes clients.
This was developed using the Lotus C API 5.0.7 Reference. Therefore, would recommend using at least a 5.0.7 Notes client or higher with this database.
Only WIN32 Platform
Advice/Warning
The Hide Design option only disables the Notes client options from looking at a selected database's design elements. It does not strip any code.
Get NotesPeek to look at changes made to advanced replication notes.
Build on/expand the script libraries for your own requirements.
Code Attachments
Comments
Posted by Sebastian Weber on 08/13/2004 02:13:26 AMGet/set "Disable background agents for this database" ?
I looked through the code but couldn't find the functions for getting/setting the "Disable background agents for this database" property. Am I blind or did Davide forget something?
Posted by Davide Varotto on 08/17/2004 04:13:14 PMRe: Get/set "Disable background agents for this database"
You can set "Disable background agents for this database" using this property "DoNotRunChronosOnDatabase". Please refer to the help documents providing with the database.
By
Posted by Manfred Meise on 10/04/2004 07:40:14 AMSetting properties in R6 does not work?
I did use the class as part of a R6 application. Unfortunately changing properties seems to be not functioning (even though I called the "save" method). I especially tested "LZ1" compression
Posted by Nicolas Nieto on 04/20/2009 06:56:27 AMEnable WebUseSLL Problem
The library code has a mistake on the Funtion enableWebUseSSL()
Line 321 in DBProperty Library
Current code :
Private Function enableWebUseSSL()
If Not( enableWebUseSSL()) Then
sFlag=sFlag+CHFLAG_WEB_USESSLCONN
End If
End Function
>>Problem : You can see the function call itself in the 'if Not' test > Stack overflow
Solution proposed :
Private Function enableWebUseSSL()
If Not( isWebUseSSL()) Then
sFlag=sFlag+CHFLAG_WEB_USESSLCONN
End If
End Function
Haven't tested others functions cause it was this property I was looking for.
But it's now working on version 6.56.