Encore un plantage que j'explique pas...
Hello @ll
Ca doit pas être grand chose mais c'est bizare. J'appelle différentes fonctions avec les mêmes paramètres... et pour une ça plante qund j'instancie une db !!
-> en rouge les lignes qui me soucient... la première est celle qui renvoie l'erreur, la seconde c'est qu'il ne se passe rien... pas d'ajout dans le champ ArchiveLog !!!
L'appel :
Dim sourceServer As String
Dim sourcePath As String
sourceServer = curdoc.server(0)
sourcePath = curdoc.PathName(0)
tmpLocalPath =Replace( "C:\TmpReplica\" & sourcePath, "/","\")
Set RattacheDb = dbToArchive.CreateCopy ( "",tmpLocalPath )
If curdoc.DatabaseType(0) <> "1" Then
Call curdoc.ReplaceItemValue("LogArchive", "## Rattachement ## "+ Chr$(13) + curdoc.GetItemValue("LogArchive")(0))
Call CopyKeyWord (curdoc, sourceServer, sourcePath, "", tmplocalPath )
Call CopyACL(sourceServer, sourcePath, "", tmplocalPath)
Call CopyProfile(curdoc, sourceServer, sourcePath, "", tmplocalPath )
End If
Et la proc qui déconne :
Sub CopyProfile(curdoc As notesdocument, PrdServer As String, PrdPath As String, NewDbServer As String, NewDbPath As String)
On Error 0 Resume Next
On Error 20 Resume Next
On Error Goto ErrLog
Dim dbProd As NotesDatabase
Dim dbTest As NotesDatabase
Dim prodDocProfile As NotesDocument
Set dbProd = New NotesDatabase(prdServer, prdPath)
......
ErrLog :
Msgbox "err : " & Error
Call curdoc.ReplaceItemValue("ArchiveLog", " Attach : Copie doc Profile, Err :" + Str(Err) +Chr$(13) +curdoc.GetItemValue("ArchiveLog")(0))
Call curdoc.save(True, False)
Exit Sub
End Sub
Pourtant les param que je passe sont ok, la meilleure preuve c'est qu'ils apparaissent dans le message d'erreur. La base existe et j'ai les droits pour l'ouvrir ! alors quid ?

Ca doit pas être grand chose mais c'est bizare. J'appelle différentes fonctions avec les mêmes paramètres... et pour une ça plante qund j'instancie une db !!
-> en rouge les lignes qui me soucient... la première est celle qui renvoie l'erreur, la seconde c'est qu'il ne se passe rien... pas d'ajout dans le champ ArchiveLog !!!
L'appel :
Dim sourceServer As String
Dim sourcePath As String
sourceServer = curdoc.server(0)
sourcePath = curdoc.PathName(0)
tmpLocalPath =Replace( "C:\TmpReplica\" & sourcePath, "/","\")
Set RattacheDb = dbToArchive.CreateCopy ( "",tmpLocalPath )
If curdoc.DatabaseType(0) <> "1" Then
Call curdoc.ReplaceItemValue("LogArchive", "## Rattachement ## "+ Chr$(13) + curdoc.GetItemValue("LogArchive")(0))
Call CopyKeyWord (curdoc, sourceServer, sourcePath, "", tmplocalPath )
Call CopyACL(sourceServer, sourcePath, "", tmplocalPath)
Call CopyProfile(curdoc, sourceServer, sourcePath, "", tmplocalPath )
End If
Et la proc qui déconne :
Sub CopyProfile(curdoc As notesdocument, PrdServer As String, PrdPath As String, NewDbServer As String, NewDbPath As String)
On Error 0 Resume Next
On Error 20 Resume Next
On Error Goto ErrLog
Dim dbProd As NotesDatabase
Dim dbTest As NotesDatabase
Dim prodDocProfile As NotesDocument
Set dbProd = New NotesDatabase(prdServer, prdPath)
......
ErrLog :
Msgbox "err : " & Error
Call curdoc.ReplaceItemValue("ArchiveLog", " Attach : Copie doc Profile, Err :" + Str(Err) +Chr$(13) +curdoc.GetItemValue("ArchiveLog")(0))
Call curdoc.save(True, False)
Exit Sub
End Sub
Pourtant les param que je passe sont ok, la meilleure preuve c'est qu'ils apparaissent dans le message d'erreur. La base existe et j'ai les droits pour l'ouvrir ! alors quid ?