Manage Learn to apply best practices and optimize your operations.

Easy function to populate database in data directory

How to use: Dim dta As Variant dta=populatedbs("DEVR5","mail",2)

How to use:
Dim dta As Variant

This would return an array with the titles of the databases under the mail directory

 Function PopulateDbs(ServerName As String,StartPath As String,ReturnValue As Integer) As Variant 'Servername = Name of Server to retrieve info from 'StartPath = path after notes data path that should be searched 'Returnvalue = type of info 1=db title | path 2= db title 3= filepath Dim dbdir As New NotesDbDirectory(ServerName) Dim founddb As NotesDatabase Dim filen As String Dim InfoLine As String Dim Info() As String Dim Counter As Long Counter=0 Redim Info(Counter) Set founddb = dbDir.GetFirstDatabase(DATABASE) While Not(founddb Is Nothing) filen=founddb.filepath If Ucase(Left(filen,Len(StartPath))) =Ucase(StartPath) Then Redim Preserve Info(Counter) Counter=Counter+1 Select Case ReturnValue Case 1 Info(Ubound(Info))=founddb.title + " | " + founddb.filepath Case 2 Info(Ubound(Info))=founddb.title Case 3 Info(Ubound(Info))=founddb.filepath End Select End If Set founddb = dbDir.GetNextDatabase Wend PopulateDbs=Info End Function

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...