General information
Category:
The Mere Mortals .NET Framework
>Dave:
>
>We are checking for duplicates in the business object for the table you're checking. To do this, you would need to create a rule to check for duplicates, and call it from the CheckRulesHook(DataSet ds, string tableName) method. Here is a sample:
>
>public override bool CheckRulesHook(DataSet ds, string tableName)
>{
> if (ds != null)
> {
> DataRow dr = ds.Tables[tableName].Rows[0]; this.CheckForDuplicateStatusCode(dr["sa_status"].ToString(),(int)dr["pk_spstatus"]);
> }
> return this.ErrorProviderBrokenRuleCount == 0;
>}
>
>If this example, you would need to create a method called CheckForDuplicateStatusCode. This is where you would put your code to check for duplicate records.
>
>Hope that helps.
>
>Lori S.
Hi Lori,
What does your CheckForDuplicateStatusCode method look like??
I made one up that always returns an error condition and yet the error condition is not being caught... see new thread on this subject.
Dave
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only