Bagikan melalui


BusinessLogicModule.InsertErrorHandler Metode

Definisi

Metode opsional mengimplementasikan logika bisnis kustom yang dipanggil ketika kesalahan terjadi pada saat pernyataan INSERT sedang diunggah atau diunduh.

public:
 virtual Microsoft::SqlServer::Replication::BusinessLogicSupport::ActionOnDataError InsertErrorHandler(Microsoft::SqlServer::Replication::BusinessLogicSupport::SourceIdentifier insertSource, System::Data::DataSet ^ insertedDataSet, Microsoft::SqlServer::Replication::BusinessLogicSupport::ErrorLogType % errorLogType, System::String ^ % customErrorMessage, int errorCode, System::String ^ errorMessage, int % historyLogLevel, System::String ^ % historyLogMessage);
public virtual Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError InsertErrorHandler (Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier insertSource, System.Data.DataSet insertedDataSet, ref Microsoft.SqlServer.Replication.BusinessLogicSupport.ErrorLogType errorLogType, ref string customErrorMessage, int errorCode, string errorMessage, ref int historyLogLevel, ref string historyLogMessage);
abstract member InsertErrorHandler : Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier * System.Data.DataSet * ErrorLogType * string * int * string * int * string -> Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError
override this.InsertErrorHandler : Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier * System.Data.DataSet * ErrorLogType * string * int * string * int * string -> Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError
Public Overridable Function InsertErrorHandler (insertSource As SourceIdentifier, insertedDataSet As DataSet, ByRef errorLogType As ErrorLogType, ByRef customErrorMessage As String, errorCode As Integer, errorMessage As String, ByRef historyLogLevel As Integer, ByRef historyLogMessage As String) As ActionOnDataError

Parameter

insertSource
SourceIdentifier

SourceIdentifier yang menunjukkan apakah sumber sisipan yang menghasilkan kesalahan adalah Penerbit atau Pelanggan.

insertedDataSet
DataSet

Himpunan data yang berisi GUID baris yang disisipkan.

errorLogType
ErrorLogType

ErrorLogType parameter output yang mengontrol cara replikasi mencatat kesalahan. Parameter ini hanya digunakan jika nilai yang dikembalikan adalah AcceptCustomErrorBehavior.

customErrorMessage
String

Parameter output yang digunakan untuk mengembalikan pesan kesalahan kustom. Parameter ini hanya digunakan jika nilai yang dikembalikan adalah AcceptCustomErrorBehavior.

errorCode
Int32

Kode kesalahan yang sesuai dengan kesalahan replikasi mendasar yang terjadi.

errorMessage
String

Teks pesan kesalahan yang sesuai dengan kesalahan replikasi mendasar yang terjadi.

historyLogLevel
Int32

Tingkat log pesan kustom yang dikembalikan oleh penangan logika bisnis kustom.

historyLogMessage
String

Pesan log yang disediakan oleh penangan logika bisnis kustom. Pesan log ditulis ke database distribusi.

Mengembalikan

Tindakan ActionOnDataError yang akan diambil oleh proses setelah handler logika bisnis kustom dijalankan.

Berlaku untuk