[DUG] Validate data entry

Marshland Engineering marshland at marshland.co.nz
Thu Jun 2 20:00:30 NZST 2011


>Form inheritance or Frames to cut 
>down on the number of different entry points.

The program is set of sequences for machining. A DBGrid displays the operations.

On double clicking the DBGrid operation, opens a form with the relevant data and the graphics is displayed.  
The data entry points are placed on the graphic at the point of interest. So each entry form is completely different. 

The machining steps are 

Thread, Rough Turn, Plunge cut, Face etc and all can be internal as well.

However for example - each form has a Depth Of Cut that has a range of 0.02 -2.5 mm. 

My thoughts  

-Create a new DB aware component that has a maximum and minimum range and use it on each form. Not ideal as I have to ensure consistency between all forms. 

-If I use OnValidate in the DM, when is this event triggered? On Post ?
If so then I could have several errors occurring at the same time when the data validated, which error belongs to which field ? 

If I use OnValidate - when I append a record, will it run all the OnValidate procedures at once ?

It looks like I may have to split the operation into to parts - check that the data entered is in the correct format (Form Property) and another to check it is in the right range (Database Property)

PS Why Delphi didn't have a DBEditNumeric or EditNumeric  component I'll never know. 
  

Thanks Chaps. 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110602/d2889410/attachment.html 


More information about the Delphi mailing list