' Checks business rules against the specified DataTable Public Overrides Function CheckRulesHook(ByVal ds As DataSet, ByVal tableName As String) As Boolean Me.ValidateShipName(Me.DataRow("ShipName")) Me.ValidateShipRegion(Me.DataRow("ShipRegion").ToString()) Return Me.ErrorProviderBrokenRuleCount = 0 End FunctionHowever, when following the link, in the middle of the page, Creating Custom Business Rule Objects the instructions for creating the same method reads like this:
Public Overrides Function CheckRulesHook(ds As DataSet, tableName As String) As Boolean If Not (ds Is Nothing) Then Dim dr As DataRow = ds.Tables(tableName).Rows(0) Me.ValidateShipName(dr("ShipName").ToString()) Me.ValidateShipRegion(dr("ShipRegion").ToString()) End If Return Me.ErrorProviderBrokenRuleCount = 0 End FunctionOversights of this magnitude cause heartache to those trying to learn the software solely via the manual ... I hope the quality of the documentation does not reflect in the code base itself. I also hope these errors are not purposeful in order to generate training revenue.