LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 7<br />
Accessing Notes Databases<br />
A database is a file used by Notes to store data in the <strong>for</strong>m of documents. A<br />
database also contains metadata in the <strong>for</strong>m of <strong>for</strong>ms, views, agents, and an<br />
Access Control List (ACL).<br />
In this chapter, we will discuss how to access a Notes database<br />
In HiTest<br />
Using Notes classes through OLE automation in <strong>Visual</strong> <strong>Basic</strong><br />
Using <strong>LotusScript</strong> in Notes.<br />
Accessing Notes Databases Using the HiTest <strong>Basic</strong> API<br />
In the HiTest <strong>Visual</strong> <strong>Basic</strong> API, the database object exists in the implicit<br />
context of the session and represents Lotus Notes databases as distinct<br />
objects. The primary attributes of a database are the server name, database<br />
name, database file path (relative to the Notes data directory), and a handle<br />
when the database is opened.<br />
A database may be opened, in which case it is represented by a handle.<br />
When opened, the contents of a database are accessed and manipulated<br />
with this handle. An open database also contains status in<strong>for</strong>mation<br />
pertaining to the database file. Many of the remaining objects exist within<br />
the context of a database. Some objects use a database directly and some<br />
indirectly through a document, which is only valid in the context of that<br />
database, including indices, open documents, metadata, and properties.<br />
Multiple databases may be opened in a single session. The HiTest API uses<br />
the global constant NULLHANDLE = 0 to represent an invalid database<br />
handle.<br />
Accessing Notes Database Properties<br />
HTDatabaseGetProperty: Fetches one of various database-level property<br />
values into a supplied buffer. Each property has a data type, and the buffer<br />
must be large enough to hold the result.<br />
123