Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Domino - Lotus Notes - Adding Connection Documents Globally

Posted on 2007-10-15
9
Medium Priority
?
317 Views
Last Modified: 2013-12-18
Hi,

Does anyone know if it is possible to add connection documents on a global basis rather than on each inidividual Lotus Notes client?

Alex.
0
Comment
Question by:NeoI5theOne
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20079726
I don't think connection documents can be managed via policies (but they should be).

We created our own tool using LotusScript that can do it, though.  Let me know if you need that solution.
0
 

Author Comment

by:NeoI5theOne
ID: 20079740
I am happy with any solution that will save me some time :)

If you don't mind sharing your LotusScript solution that would be very much appreciated.
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 1000 total points
ID: 20080023
Not sure why connection docs would be used that often.

For TCPIP based networks, if the DNS is working correctly, no connection doc is needed.

Is this for Dial up access ?

I hope this helps !

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 63

Expert Comment

by:SysExpert
ID: 20080032
In addition Dial-up settings can be set via Policies in R7 at least.


0
 
LVL 22

Assisted Solution

by:Bill-Hanson
Bill-Hanson earned 1000 total points
ID: 20080564
I pulled this example out of my NotesAddressBook class, so it won't work stand alone.  You should be able to get the idea, though.  mSess is just an initialized NotesSession object.  mDb is a class member used by subsequent methods.  Me.IsDatabaseSupported is a class method that returns true only for local address books in this case (I'll post that code also).  ThrowError is a class member that maintains an error stack.  Once you've converted all the class member stuff, this function should work stand alone.


      '/**
      ' * Creates a new connection document or updates an existing connection document.
      ' * @param serverName The name of the server listed in the connection document.
      ' * @param serverAddress The address of the server listed in the connection document.
      ' * @param overwrite Set to True to overwrite an existing connection document with a new address.
      ' * @return A NotesDocument containing the location document.
      ' */
      Public Function CreateConnectionDocument(Byval serverName As String, Byval serverAddress As String, Byval overwrite As Boolean) As NotesDocument
            
            Dim dc As NotesDocumentCollection
            Dim docConnection As NotesDocument
            Dim bDirty As Boolean
            If (TRAP_ERRORS) Then On Error Goto CATCH
            bDirty = False
            Forall db In mSess.AddressBooks
                  Set mDb = db
                  If (mDb.Open("", "")) Then
                        If (Me.IsDatabaseSupported(mDb)) Then
                              Set docConnection = Nothing
                              Set dc = mDb.Search({Type="Connection" & @Lowercase(@Name([Canonicalize]; Destination))=@Lowercase(@Name([Canonicalize]; "} & serverName & {"))}, Nothing, 0)
                              If (dc.Count > 0) Then Set docConnection = dc.GetFirstDocument()
                              If (docConnection Is Nothing) Then
                                    Set docConnection = mDb.CreateDocument()
                                    docConnection.Form = "local"
                                    docConnection.Type = "Connection"
                                    docConnection.ConnectionType = "0" ' Local Area Network
                                    docConnection.LanPortName = "TCPIP"
                                    docConnection.PortName = "TCPIP"
                                    docConnection.ConnectionLocation = "*"
                                    docConnection.Source = "*"
                                    docConnection.ConnectionRecordFirst = "1" ' Normal
                                    docConnection.RepPriority = "0" ' Low & Medium & High
                                    docConnection.DestinationDomain = "*"
                                    bDirty = True
                              Else
                                    If ((Lcase(docConnection.OptionalNetworkAddress(0)) = Lcase(serverAddress)) And _
                                    (Lcase(docConnection.Destination(0)) = Lcase(serverName))) Then
                                          Set CreateConnectionDocument = docConnection
                                          Exit Function
                                    Else
                                          If (overwrite) Then bDirty = True
                                    End If
                              End If
                              If (bDirty) Then
                                    docConnection.Destination = serverName
                                    docConnection.OptionalNetworkAddress = serverAddress
                                    docConnection.PhoneNumber = serverAddress
                                    Call docConnection.ComputeWithForm(True, False)
                                    Call docConnection.Save(True, False)
                              End If
                              Set CreateConnectionDocument = docConnection
                              Exit Function
                        End If
                        Call mDb.Close()
                        Set mDb = Nothing
                  End If
            End Forall
            Exit Function
            
CATCH:
            Call Me.ThrowError("")
            
      End Function


Here's the IsDatabaseSupported class member.  All it does is to check the class's properties against a database to see if it should be processed.  This lets me specify settings for the class at runtime so that it only process specific address books or certain types of address books.  You could modify this method by hard coding the class properties (in this code all class properties are prefixed with a lower case m).


      '/**
       ' * Checks whather a database is supported by this class based on current settings.
       ' * @param db The NotesDatabase to check.
       ' * @return True if the database is supported; False otherwise.
       ' */
      Private Function IsDatabaseSupported(db As NotesDatabase) As Boolean
            
            IsDatabaseSupported = False
            If (mReplicaId <> "") Then If (Ucase(db.ReplicaID) <> Ucase(mReplicaId)) Then Exit Function
            If (mFilepath <> "") Then If (Lcase(db.FilePath) <> Lcase(mFilepath)) Then Exit Function
            If (mFilename <> "") Then If (Lcase(db.FileName) <> Lcase(mFilename)) Then Exit Function
            IsDatabaseSupported = True
            If (db.Server = "") Then
                  ' Can't trust IsXXXAddressBook for public address books on local machine.
                  If (mIncludePublicNabs And db.IsPrivateAddressBook) Then If (Not db.GetView("Servers") Is Nothing) Then Exit Function
                  If (mIncludePrivateNabs And db.IsPrivateAddressBook) Then If (db.GetView("Servers") Is Nothing) Then Exit Function
            End If
            If (mIncludePublicNabs And db.IsPublicAddressBook) Then Exit Function
            If (mIncludePrivateNabs And db.IsPrivateAddressBook) Then Exit Function
            IsDatabaseSupported = False            
            
      End Function
0
 

Author Comment

by:NeoI5theOne
ID: 20083759
SysExpert, yes it is basically for a remote access solution which I need to send the replication through a specific port.  Otherwise DNS would suffice.
0
 

Author Comment

by:NeoI5theOne
ID: 20083762
Actually I might be able to work something
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20295874
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question