Imports System Imports System.Data Imports Microsoft.VisualBasic Imports DBMotoPublic Imports DBMotoScript Imports DBRS.GlobalScript Namespace DBRS Public Class ReplicationScript : Inherits IReplicationScript Public Overrides Sub Record_onAfterMapping(recSource As IRecord, recTarget As IRecord, ByRef AbortRecord As Boolean) If recSource.OperationType = enmOperationType.Insert Or recSource.OperationType = enmOperationType.Update Then If (recSource.GetValueAfter("id1") Is Nothing OR IsDBNull(recSource.GetValueAfter("id1"))) Return End if If recSource.GetValueAfter("id1") > 3 Then AbortRecord=True End If End If If recSource.OperationType = enmOperationType.Delete Then If recSource.GetValueBefore("id1") > 3 Then AbortRecord=True End If End If End Sub End Class End Namespace