Maybe someone can help me here...
I am totally lost on this.
I am moving a server to a new IP address, we have to remove two connection document entries and add two new ones. Also I would really like to beable to flush the cache if possible. I would like to do this by email, so a lotus script button would be cool. I have the code for adding the new entries and flushing the cache.
This is for the new entries.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim Username As New NotesName(session.UserName)
Dim empdb As New NotesDatabase("","names.nsf")
Dim conndoc As New NotesDocument(empdb)
Set conndoc = New Notesdocument(empdb)
Set conndoc1 = New Notesdocument(empdb)
conndoc.form = "Connection"
conndoc.ConnectionType = "0"
conndoc.Destination = "CN=mail/O=Alin"
conndoc.LanPortName = "TCPIP"
conndoc.PortName = "TCPIP"
conndoc.ConnectionLocation = "*"
conndoc.OptionalNetworkAddress = "123.456.678.345"
conndoc.PhoneNumber = "See Me"
conndoc.ConnectionLocation = "*"
conndoc.Type = "Connection"
conndoc.ConnectionRecordFirst="1"
conndoc.Source="*"
Call conndoc.Save( True, True )
conndoc1.form = "Connection"
conndoc1.ConnectionType = "0"
conndoc1.Destination = "CN=mail/O=Alin"
conndoc1.LanPortName = "TCPIP"
conndoc1.PortName = "TCPIP"
conndoc1.ConnectionLocation = "*"
conndoc1.OptionalNetworkAddress = "123.456.678.345"
conndoc1.PhoneNumber = "See Me Again"
conndoc1.ConnectionLocation = "*"
conndoc1.Type = "Connection"
conndoc1.ConnectionRecordFirst="1"
conndoc1.Source="*"
Call conndoc1.Save( True, True )
Messagebox "Hey, you're done. Updated. That's it. You can now delete this email message."
End Sub
This is for the cache
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db=session.GetDatabase("","NAMES.NSF")
Set view=db.GetView("Locations")
Set doc=view.GetFirstDocument
While Not (doc Is Nothing)
Call doc.RemoveItem("$SavedAddresses")
Call doc.RemoveItem("$SavedPorts")
Call doc.RemoveItem("$SavedServers")
Call doc.save(True,True)
Set doc=view.GetNextDocument(doc)
Wend
Messagebox("Removing Cached Addressed Completed")
End Sub
Any help would be appericated...
Thank You
I am totally lost on this.
I am moving a server to a new IP address, we have to remove two connection document entries and add two new ones. Also I would really like to beable to flush the cache if possible. I would like to do this by email, so a lotus script button would be cool. I have the code for adding the new entries and flushing the cache.
This is for the new entries.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim Username As New NotesName(session.UserName)
Dim empdb As New NotesDatabase("","names.nsf")
Dim conndoc As New NotesDocument(empdb)
Set conndoc = New Notesdocument(empdb)
Set conndoc1 = New Notesdocument(empdb)
conndoc.form = "Connection"
conndoc.ConnectionType = "0"
conndoc.Destination = "CN=mail/O=Alin"
conndoc.LanPortName = "TCPIP"
conndoc.PortName = "TCPIP"
conndoc.ConnectionLocation = "*"
conndoc.OptionalNetworkAddress = "123.456.678.345"
conndoc.PhoneNumber = "See Me"
conndoc.ConnectionLocation = "*"
conndoc.Type = "Connection"
conndoc.ConnectionRecordFirst="1"
conndoc.Source="*"
Call conndoc.Save( True, True )
conndoc1.form = "Connection"
conndoc1.ConnectionType = "0"
conndoc1.Destination = "CN=mail/O=Alin"
conndoc1.LanPortName = "TCPIP"
conndoc1.PortName = "TCPIP"
conndoc1.ConnectionLocation = "*"
conndoc1.OptionalNetworkAddress = "123.456.678.345"
conndoc1.PhoneNumber = "See Me Again"
conndoc1.ConnectionLocation = "*"
conndoc1.Type = "Connection"
conndoc1.ConnectionRecordFirst="1"
conndoc1.Source="*"
Call conndoc1.Save( True, True )
Messagebox "Hey, you're done. Updated. That's it. You can now delete this email message."
End Sub
This is for the cache
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db=session.GetDatabase("","NAMES.NSF")
Set view=db.GetView("Locations")
Set doc=view.GetFirstDocument
While Not (doc Is Nothing)
Call doc.RemoveItem("$SavedAddresses")
Call doc.RemoveItem("$SavedPorts")
Call doc.RemoveItem("$SavedServers")
Call doc.save(True,True)
Set doc=view.GetNextDocument(doc)
Wend
Messagebox("Removing Cached Addressed Completed")
End Sub
Any help would be appericated...
Thank You