TechTricks
Technical answers from the trenches 
 
 
 
 

     
   
Saving Values in Upper Case
 
   
 Posted: 1 October 2000
 
   
 
 Applies to: Paradox 5.0 and later
 
   
 
Audience: Everyone
 
       
   

Question: How do I save field values to upper case?

Answer: Use a Picture (*!)

Pictures are validation checks (also called valchecks) that enforce rules against your data values. When added to a table's structure, these rules are enforced regardless of the process used to update your data. For example, if you place a *! picture on the Name field of the Customer sample table provided with most versions of Paradox, data entered into that field is automatically converted to upper case each time data is entered into that field. This occurs when you enter data interactively, via ObjectPAL, through a ChangeTo (or Update) query, or even another program (such as a Delphi application).

To add a Picture to a table, restructure the table, select the field, and then use the Picture Assist button to assign the picture. When you save your structural changes, your rules are permanently saved and will be applied to all new records.

Please note than Paradox 9.0 requires pictures to be saved on the system; this restriction does not apply to earlier versions.

Table-level pictures can be restrictive in certain circumstances. If you want to apply a picture when data is entered by your end-users, but not in other cases, assign the picture to the Picture property of a field object on a form. You can also assign Pictures to field objects on forms. When you do this, the rules are enforced only for that specific field object. This lets you control the data entry process while leaving a bit of flexibility for your code.

Finally, pictures are only applied against data entered after the picture is applied. For information about converting existing data to correspond with your Picture, please see Converting Field Values to Upper Case.

 

       

Top

Feedback About Paradox Delphi Assorted Web Stuff
 
 
Copyright © 2000-2004, techtricks.com; All Rights Reserved.
Acknowledgements, Disclaimers, Terms and Conditions.
Article last updated on 31 May 2003

 

Other Sites: Paradox, Delphi, Perl, Web Stuff, and More


 

[- End -]