Ls and icons stack on workspace

Hi,

I have an agent that I call on a post-open database : I want some specific user to open this database on a specific server. the script is OK : if the user is on the wrong server, it opens the database on the correct server but

I can’t bring the database icon on the top of the stack on the workspace : the icon on the top of the stack always points to the bad server and the icon for the good server stays below. How can I solve that ? Here is my script :

Sub Initialize

Dim Session As New NotesSession     

Dim db As NotesDatabase

Dim userName As NotesName

Dim workspace As New NotesUIWorkspace



Set db = Session.CurrentDatabase



Set userName = session.CreateName(session.UserName)

If userName.OrgUnit1 = "MONTPELLIER" Then

	serveur = "HERMES2/SNI"

Else

	serveur = "Tempo/systeme/sni"

End If





Call workspace.OpenDatabase( serveur , db.FilePath )

End Sub

Subject: ls and icons stack on workspace

If you put a adddatabase?

JYR

Subject: RE: ls and icons stack on workspace

I also tried to put workplace.adddatabase and it is the same : the icon stays below