Domino 9 und frühere Versionen > ND7: Entwicklung

Replik wechseln Server<-> Lokal

<< < (2/3) > >>

LisaS:
Habs jetzt so und es wird immer noch nicht geschlossen.

--- Code: ---Sub Click(Source As Button)
Dim s As New NotesSession
Dim uiws As New NotesUIWorkspace
Dim this_uidb As NotesUIDatabase
Dim server_default As String
Dim server_act As String
Dim RepID As String
Dim flag_ds As Boolean
Dim flag_rs As Boolean
Dim thisDB As NotesDatabase
Dim newDB As New NotesDatabase( "", "" )
Dim tmp As String

Set thisDb = s.CurrentDatabase
Set this_uidb = uiws.CurrentDatabase
repID = thisDB.ReplicaID
server_act = thisDB.Server
server_default = s.GetEnvironmentString("MailServer",True)
If server_act = "" Then
If newDB.OpenByReplicaID( server_default, RepID ) Then
Call this_uidb.Close
Call uiws.OpenDatabase( server_default,newDB.FilePath)
Print( "Server-Replik geöffnet" )
Else
Print( "Die Replik konnte nicht gefunden werden" )
End If
Else
If newDB.OpenByReplicaID( "", RepID ) Then
Call this_uidb.Close
Call uiws.OpenDatabase("",thisDB.FilePath)
Print( "Lokale-Replik geöffnet" )
Else
Print( "Die Lokale-Replik konnte nicht gefunden werden" )
End If
End If
End Sub
--- Ende Code ---

m3:
Seufz. Auch thisDb ist ein BACKEND Daatenbankobjekt. Das kannst 20 mal schließen, da tut sich im Frontend gar nix.

LisaS:
Ne ist es nicht - this_uidb

--- Code: ---Set this_uidb = uiws.CurrentDatabase
--- Ende Code ---

--- Code: ---Call this_uidb.Close
--- Ende Code ---

LisaS:
wenn ich einen Button mit einem Script mache wo nur geschlossen werden soll gehts ???
Warum dann nicht im anderen Script?

--- Code: ---Sub Click(Source As Button)
Dim s As New NotesSession
Dim uiws As New NotesUIWorkspace
Dim this_uidb As NotesUIDatabase
Dim server_default As String
Dim server_act As String
Dim RepID As String
Dim flag_ds As Boolean
Dim flag_rs As Boolean
Dim thisDB As NotesDatabase
Dim newDB As New NotesDatabase( "", "" )
Dim tmp As String

Set thisDb = s.CurrentDatabase
Set this_uidb = uiws.CurrentDatabase
Call this_uidb.Close
End Sub

--- Ende Code ---

Driri:
Läuft das Script denn in den Then-Zweig rein ? Hast Du schon mal den Debugger mitlaufen lassen ?

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln