Open server and loop thru all databases

Simple code to open a specific server and list all the visible databases.

Dim dbdir As New NotesDBDirectory("dominosb2/dominosb2" )	
Dim tdb As notesdatabase
Set tdb = dbdir.GetFirstDatabase(Database)     
If tdb Is Nothing Then
	Print "first db could not be opened" 
	Do While Not (tdb Is Nothing)
			If tdb.Title="Meme's Bakery Cafe" Then
			Print tdb.title + "(" + tdb.filepath + ")"
			Print "[" + "<br>" + "]"
			Call tdb.Open( "", "" )
			If tdb.IsOpen Then
				Print "db open " & Now
				Print "db not open " & Now'
			End If	
			Exit Do
		End If
		Set tdb = dbdir.GetNextDatabase
End If

Written by Frank Joseph Brefere III

Posted by fbrefere001 on Monday November 2, 2009