上一次我们提到,Database icon 文档里面包含很多数据库属性信息。实际上它们都保存在 $Flags 域中,而这个域中每个字符都代表一个属性,列表如下(来源于 Notes C API 中的 stdnames.h 文件):
Flag = Meaning / Action
4 = Allow Soft Deletes
Z = Enable LZ1 Compression
f = Do Not Allow Stored Forms
z = Do Not Maintain Unread Marks
h = Mark Parent Document on Reply or Forward
J = Use JavaScript when generating Web Pages
F = Launch Designated Frameset
n = Never Show Policy (ie. Never show About Database when first opened)
7 = Large UNK Table (ie. allow more fields in database)
6 = Allow Design Locking
K = Restore as lasted viewed by user
c = Show About Database if Modified
Q = Replicate Unread Marks to Clustered Servers Only
U = Replicate Unread Marks to All Servers (appears with Q set)
2 = Optimise Document Table Bitmap
3 = Maintain LastAccessed Property
1 = Don’t Support Specialised Response Hierarchy
M = Multilingual Database
X = Web Access Requires SSL Connection
8 = Web Access Don’t Allow URL Open
i = Display Images After Loading
5 = Allow Document Locking
g = Database Type = Library
j = Database Type = Personal Journal
b = Database Type = Domino Directory
B = Database Type = Directory Catalog
m = Database Type = Multi DB Search
u = Database Type = Portfolio
A = Database Type = Mailbox
r = Database Type = Mailfile
p = Always Show About Database Document (ie. When Opened in the Client Property)
l = Launch Designated Navigator
s = Launch Designated Navigator in Own Window (used in conjuction with l above)
a = Launch First Attachment in About Database Document
d = Launch First DocLink in About Database Document
P = Web Launch = Show About Database Document
S = Web Launch = Open Designated Frameset
E = Web Launch = Open Designated Page
L = Web Launch = Open Designated Navigator in its Own Window
D = Web Launch = Open First DocLink in About Database Document
T = Web Launch = Open Designated DocLink
V = Web Launch = Open First Document in Designated View
通过向这个域中增加(或除去)字符标记,即可设置(或取消)相应的属性。下面是一段具体的代码:
Set doc = db.GetDocumentByID(“FFFF0010”) ‘获得 Icon 文档
doc.~$Flags = doc.~$Flags(0) & “x” ‘x代表需要增加的属性
doc.Save (True, False)