Bagikan melalui


BusinessLogicModule.UpdateErrorHandler Metode

Definisi

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

public:
 virtual Microsoft::SqlServer::Replication::BusinessLogicSupport::ActionOnDataError UpdateErrorHandler(Microsoft::SqlServer::Replication::BusinessLogicSupport::SourceIdentifier updateSource, System::Data::DataSet ^ updatedDataSet, 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 UpdateErrorHandler (Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier updateSource, System.Data.DataSet updatedDataSet, ref Microsoft.SqlServer.Replication.BusinessLogicSupport.ErrorLogType errorLogType, ref string customErrorMessage, int errorCode, string errorMessage, ref int historyLogLevel, ref string historyLogMessage);
abstract member UpdateErrorHandler : Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier * System.Data.DataSet * ErrorLogType * string * int * string * int * string -> Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError
override this.UpdateErrorHandler : Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier * System.Data.DataSet * ErrorLogType * string * int * string * int * string -> Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError
Public Overridable Function UpdateErrorHandler (updateSource As SourceIdentifier, updatedDataSet 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

updateSource
SourceIdentifier

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

updatedDataSet
DataSet

Himpunan data yang mewakili pernyataan UPDATE yang menyebabkan kesalahan.

errorLogType
ErrorLogType

ErrorLogType parameter output yang mengontrol bagaimana 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 yang mendasar yang terjadi.

errorMessage
String

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

historyLogLevel
Int32

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

historyLogMessage
String

Pesan log yang disediakan oleh handler 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