GetServerAndPath

Function returns the server and path of the existing database. The path value is minus the filename itself which allows you to append other filenames to open other databases in the same directory.
LotusScript


Function GetServerAndPath (server As String, path As String)
	Dim ss As New notessession
	Dim db As notesdatabase
	Dim i As Integer
	
	Set db=ss.currentdatabase
	server=db.server
	
	path=""
	For i=Len (db.filepath) To 1 Step -1
		If Mid(db.filepath,i,1)="\" Then
			If i > 1 Then
				path =Left (db.filepath, i-1) & "\"
			End If
			Exit For
		End If
	Next
End Function

Posted by fbrefere001 on Wednesday February 13, 2002