Specifying a Validation Message
\The Sandbox \PB History & Future \New in PB 2 \Painter Features \DataWindow Painter \Validation Message
Assigning
Accelerators
Tag Values
DW Icon
Comments
Changing
Databases
Controlling DW
Updates
OLE Columns
DataWindow
Reports
Dynamic DWs
Runtime Print
Specifications
Displaying the
DDLB Arrow
Displaying
Row Counts
Sort and Filter
Testing
Modifying Result
Sets Descriptions
Moving Object
with Keyboard
Naming Objects
Aggregate
Functions
New Color Bar
Events
DW Functions
New Menu Items
Grid Style
Shortcut Keys
Align Objects
Size Objects
Space Objects
Saving DWs
with Comments
Keyboard Object
Selection
Selecting a Font
Selecting a
Line Edit
Keyboard Sizing
Specifying
SQL Syntax
Background
Color
Timer Interval
Unit of Measure
Validation
Message
DB Table
Changes
Suppressing
Repeating Values
Testing an
OLE Column
Using Comments

Validation rules are used to validate user-entered data. You can define a validation rule in either the Database Painter or in the DataWindow Painter.  If a validation rule is defined for a column in the Database Painter, the rule displays in the Column window in the DataWindow Painter and you can change it for the current DataWindow. 

Note: Changing the validation rule for a DataWindow does not change the rule in the database.

To specify a validation rule:

  1. Double-click the column name and number.  The Column window displays.  If a validation rule was defined for the column in the Database Painter, it displays and you can override it here for the DataWindow.
  2. Click the Validate button to define a new validation rule.  The Column Validation Definition window displays. 
  3. Define the validation rule.  To identify a column, use the name of the column or the number of the column's position in the DataWindow.
  4. For example, to check that the data entered by the user is a positive number, use this validation rule:  Integer(GetText(dw_Emp)) > 0.

  5. Enter a string or expression in the Error Message Expression box to change the message that displays when a value in the column does not pass validation and an ItemError event occurs.  The expression in the Error Message Expression box will display instead of the standard error message.
  6. Click the Verify button to verify the expressions but not close the Column Validation Definition window.
  7. Click the OK button to verify the expressions and close the Column Validation Definition window.
  8. Click the OK button to close the Column window and display the DataWindow Painter workspace.
PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com