|
Specifically, I have added a global error indicator to the service program. In each setter, I turn this global on if a validation fails. In the update and write procedure, I check to see if this global is on; if not, I write or update the record. I wanted to add this global to the template. Or, am I missing something? Kyle On Tue, 01 Mar 2005 10:26:42 +0000, Joel Cochran <jrc@xxxxxxxxxx> wrote: > On Tue, 2005-03-01 at 14:37, Kyle Collie wrote: > > I'm placing my data validation code in the setters. Is this not the > > "correct" place? > > > > Kyle > > It is, but there is no way to know at design time (for the tool itself) > what that validation should be. Validation is specific to every > procedure: you have to know the field name, the field type, and the rule > you are trying to enforce. > > Adding specifics to a template just doesn't make sense. You'd have to > change the template every time you ran the tool. The template is there > for constant procedures, in other words, procedures that should occur in > *every* encapsulating service program. As such, you can add all the > constant methods you want. > > I could be missing something: give me an example of what you are trying > to accomplish. > > Joel > > _______________________________________________ > This is the RPGNext Discussion and Information (RPGNext) mailing list > To post a message email: RPGNext@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpgnext > or email: RPGNext-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpgnext. >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.