LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Following is an explanation of the code:<br />
We delete a view in the database specified by hgdatabase. The view is<br />
specified by hgviewid. If it cannot run successfully, an error code is<br />
returned.<br />
hgstatus = HTViewDelete(hgdatabase, hgviewid)<br />
If the view is deleted successfully, a message displays saying that the view<br />
has been deleted.<br />
If hgstatus = 0 Then Print "The view has been deleted."<br />
Other Functions in HiTest <strong>for</strong> Working with Views<br />
HTViewCopy: Copies a view from one database to another.<br />
HTViewList: Iterates through views in a database.<br />
HTViewcellFetch: Converts and retrieves the data <strong>for</strong> a viewcell into a<br />
supplied buffer.<br />
HTViewcellGetLength: Obtains the length of a viewcell as converted to a<br />
specified data type.<br />
Accessing Notes Views and Folders in <strong>Visual</strong> <strong>Basic</strong> Using Notes Classes<br />
through OLE Automation<br />
We translate the HiTest view functions to equivalent methods and<br />
properties using Notes classes. The NotesView class lets you locate<br />
documents within views and folders, and per<strong>for</strong>m operations on views<br />
and folders.<br />
Following is a table which converts the HiTest <strong>Basic</strong> API functions to the<br />
equivalent functions and properties using Notes classes:<br />
HiTest Function Name Notes Classes Notes Classes<br />
Methods and<br />
Properties<br />
Summary<br />
HTViewCopy Copies a view from one database to<br />
another.<br />
HTViewDelete NotesView Remove Deletes a view from a database.<br />
HTViewList Iterates through views in a database.<br />
HTViewLocateByName NotesDatabase GetView, New Obtains a view ID from the view<br />
name.<br />
Continued<br />
138 <strong>LotusScript</strong> <strong>for</strong> <strong>Visual</strong> <strong>Basic</strong> <strong>Programmers</strong>