Chapter 9 Accessing objects using VBScript


Managing the repository browser

You can manage the repository browser using VBScript as follows:

You can create a folder using the following method: CreateFolder(ByVal FolderName As String) As BaseObject

Example

RepositoryConnection.CreateFolder("VBTest")

You can delete an empty folder using the following method: DeleteEmptyFolder() As Boolean

Example

Dim C
Set C = RepositoryConnection
C.Open "MyRepDef"
' Retrieve the deepest folder under the connection
Dim D, P
   set P = Nothing
   for each D in C.ChildObjects
      if D.IsKindOf (cls_RepositoryFolder) then
            D.DeleteEmptyFolder 
            c.refresh 
      end if
   next

 


Copyright (C) 2005. Sybase Inc. All rights reserved.