Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is the right place for record validation function?
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01140952
Message ID:
01142017
Views:
13
> 1. Am I doing at the right place?

Yes, this is the place where you should check your rules before saving

> 2. If yes, how do I suppress the warning message?

My fault...the VB .NET code in the Dev Guide was not correct. Try initializing your connection as follows:
Dim Connection As IDbConnection = Nothing
The C# code uses an output parameter (which VB .NET doesn't have) that doesn't require you to init the variable in C#.

> 3. For the line "Me.AddErrorProviderBrokenRule("CustomerID", message)", what should I put as the
> first parameter to replace CustomerID since this is a combination of fields?

The first parameter is used to determine which user interface control is associated with the error. So you can set it to any column you want to flag with the associated error.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform