Comparing document changes
From time to time I have the need to compare the documents of two databases for changes:
- Before I clean-up a Domino configuration I create a backup copy (File - Application - New Copy). Once I'm done I generate the report of changes made - reliably without missing a field
- We suspect data was altered by a rookie user. Using a backup copy all the changes made need to be highlighted
- Suspecting that a replication went awry I want to compare two instances of one database on different servers
Public Class CompareEnging
Sub New (sServer As String, sDB As String, tServer As String, tDB As String )
Public Property Set reportOnlyChangedFields As Boolean
Public Property Set eMailResults As Boolean
Public Sub addExcludedForm (formName As String )
Public Sub addExcludedField (fieldName As String )
Private Function fixTextforHTML (orgText As String ) As String
Public Function report
Sub reportNewDocuments (targetDB As NotesDatabase )
Sub compareTargetDoc (tDoc As NotesDocument )
Sub compareSourceDoc (sDoc As NotesDocument, tDB As NotesDatabase )
Function documentSingleDoc (doc As NotesDocument, txtStatus As String )
Public Sub compareTwoDocuments (sDoc As NotesDocument, tDoc As NotesDocument )
End Class
Function ReplaceSubstring (sourcestr As String, fromstr As String, tostr As String ) As String
Download the Full Source code. As usual - YMMVSub New (sServer As String, sDB As String, tServer As String, tDB As String )
Public Property Set reportOnlyChangedFields As Boolean
Public Property Set eMailResults As Boolean
Public Sub addExcludedForm (formName As String )
Public Sub addExcludedField (fieldName As String )
Private Function fixTextforHTML (orgText As String ) As String
Public Function report
Sub reportNewDocuments (targetDB As NotesDatabase )
Sub compareTargetDoc (tDoc As NotesDocument )
Sub compareSourceDoc (sDoc As NotesDocument, tDB As NotesDatabase )
Function documentSingleDoc (doc As NotesDocument, txtStatus As String )
Public Sub compareTwoDocuments (sDoc As NotesDocument, tDoc As NotesDocument )
End Class
Function ReplaceSubstring (sourcestr As String, fromstr As String, tostr As String ) As String
Posted by Stephan H Wissel on 27 March 2011 | Comments (2) | categories: Show-N-Tell Thursday