C'est OK....
Fallait juste utiliser 2 variables différentes (path source / path cible)... meme si c'est le même contenu .
Bref :
Declaration
Const W_API_MODULE= "nnotes.dll"
Declare Function NSFDbOpen Lib "nnotes.dll" (Byval PathName As String, rethDB As Long) As Integer
Declare Function NSFDbClose Lib "nnotes.dll" (Byval rethDB As Long) As Integer
Declare Function NSFDbCopyACL Lib "nnotes.dll" (Byval hSrcDB As Long, Byval hDstDB As Long) As Integer
Initialize
'Base Template
serverTemplate=doc.TmpDbServer(0)
cheminTemplate = doc.tmpDbPath(0)
'Info Nouvelle Base a Creer
NewdbSrv = ""
NewdbName = doc.PrdDbName(0)
NewdbTitle = doc.PrdDbTitle(0)
NewdBPath=doc.PrdDbPath(0)
[...]
verifDbTest = doc.TestDbPath(0)
Dim Template As New NotesDatabase(serverTemplate, cheminTemplate)
Set NewDb = New NotesDatabase(NewdbSrv, NewdBPath)
If Not NewDb.isOpen Then
Set NewDb = Template.CreateFromTemplate (NewdbSrv, NewdBPath, True)
NewDb.Title = NewdbTitle
FlagCreation="OK"
Call CopyACL (serverTemplate, cheminTemplate, NewdbSrv, NewdBPath)
End If
Else
FlagCreation="NOK"
End If
[...]
La Function
Function CopyACL(sourceServer As String, sourcePath As String, targetServer As String, targetPath As String)
Dim hSourceDb As Long, hTargetDb As Long, result As Integer
If (sourceServer <> "") Then sourcePath = sourceServer + "!!" + sourcePath
result = NSFDbOpen (sourcePath, hSourceDb)
result = result + NSFDbOpen (targetPath, hTargetDb)
If (result = 0) Then result = NSFDbCopyACL (hSourceDb, hTargetDb)
If hTargetDb <> 0 Then Call NSFDbClose (hTargetDb)
If hSourceDb <> 0 Then Call NSFDbClose (hSourceDb)
End Function
... Vais en faire un petit TIPS .... ca peux servir
Merci à Jeròme et a tous ceux qui m'ont mis sur la piste.