Get Admin Server Of Database

Here is a way to get the Administration Server out of the ACL using the API. No
warranty express or implied, is given as to the use of this code. Use at your
own risk.
Declare Function OSPathNetConstruct Lib "nnotes.dll" (Byval portName As String,
Byval ServerName As String, Byval FileName As String, Byval retPathName As
String)As Integer
Declare Function NSFDbOpen Lib "nnotes.dll" (Byval PathName As String, dbHandle
As Long) As Integer
Declare Function NSFDbClose Lib "nnotes.dll" (Byval dbHandle&) As Integer
Declare Function NSFDbReadACL Lib "nnotes.dll" (Byval DBHANDLE As Long,rethACL
As Long) As Integer
Declare Function ACLGetAdminServer Lib "nnotes.dll" (Byval hList As Long,Byval
ServerName As String) As Integer


Function GetAdminServer() As String

Dim hDB&,hACL&
Dim SvrName$,retPathName$
Dim Status%

retPathName$=Space$(256)
Status%=OSPathNetConstruct("","SERVER1","names.nsf",retPathName$)
SvrName$=Space$(256)
Call NSFDbOpen(retPathName$,hDB&)

If hDB& > 0 Then
Print "FOUND DB"
Status% = NSFDbReadACL(hDB&, hACL&)
If Status% = 0 Then
Status% = ACLGetAdminServer(hACL&,SvrName$)
End If
Call NSFDbClose(Ret&)
End If
GetAdminServer=SvrName$
End Function
This was first published in November 2000

Dig deeper on Domino Resources - Part 7

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close