TechTricks
Technical answers from the trenches 
 
 
 
 

     
   
Saving Data in Upper (or Lower) Case
 
   
 Posted: 5 October 2000
 
   
 
 Applies to: All versions
 
   
 
Audience: Beginner
 
       
   

Question: Can I force data values to be saved in upper or lower case?

Answer: Yes. If you're using Paradox tables, the easiest way to do this is to set a *! Picture on the field in question.

To do this in Paradox 9:

  1. Close all files using your table, including Table windows, Forms, Scripts, Reports, and other documents.

  2. From the main Paradox menu, choose Tools | utilities | Restructure.

  3. When the Select File dialog appears, select your table and then choose OK.

  4. When the table's structure is displayed, select the field you want to add the picture to and then move to the Picture column (near the right side of the dialog).

  5. A drop-down list shows predfined pictures, scroll through it until you see All Capitalized and then choose it.

  6. Choose OK to save your changes

If you do not see the picture you need in the drop-down list, choose Picture Assistant to define and save a custom picture. For more information, see online Help

Understanding Pictures

Pictures are like templates; they validate and format data values as you enter them into tables.

When defined in the Restructure dialog, Pictures become global "business rules" for that table; this means that the rules are enforced regardless of how or where the table is updated. For example, a picture formats data entered by hand through a table window, by hand through a form, by ObjectPAL, and so on.

Pictures are a Validation Check (also called valcheck); Paradox tables support additional valchecks, including:

  • Min, which assigns a minimum value that the field will accept.

  • Max, which assigns a maximum value that the field will accept.

  • Default, which assigns a default value for the field.

Additional details can be found in the online Help files.

Keep in mind that Pictures defined in the Restructure dialog apply to all uses of the table. If this is too restrictive, you can define pictures on field objects placed on forms. This means you can define a temporary picture that's only enforced in a single location.

The downside to pictures is that they generally only affect new records; they do not (often) reevaluate existing records for compliance with the rule. Other valchecks validate data already in the table, however, pictures do not reformat existing data.

For more information, consult online Help.

 

       

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 -]