Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to check for duplicates before posting a new recor
Message
From
19/05/2005 08:24:39
 
 
To
19/05/2005 00:37:54
Dave Porter
Medical Systematics, Inc.
Merced, California, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01015688
Message ID:
01015786
Views:
28
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform