GetUpdateStatus  GetValue

Chapter 9: Methods for the DataWindow Control

GetValidate

Description

Obtains the validation rule for a column in a DataWindow.

Syntax

string dwcontrol.GetValidate ( string column )
string dwcontrol.GetValidate ( integer column )

Argument

Description

dwcontrol

A reference to a DataWindow control, DataStore, or child DataWindow.

column

The column for which you want the validation rule. Column can be a column number or a column name. The column number is the number of the column as it is listed in the Column Specification view of the DataWindow painter—not necessarily the number of the column in the Design view.

Returns

Returns the validation rule for column in dwcontrol. Returns the empty string ("") if no validation criteria are defined for the column. If any argument value is NULL, the method returns NULL.

Usage

You can use GetValidate to save the current validation rule before calling SetValidate to change the rule temporarily.

Examples

Example 1

These statements change the validation rule for column 7 in the DataWindow control dw_Employee to Rule2:

string Rule1, Rule2 = "Long(GetText()) > 15000"

Rule1 = dw_Employee.GetValidate(7)

dw_Employee.SetValidate(7, Rule2)

See also





Copyright © 2004. Sybase Inc. All rights reserved. GetValue

View this book as PDF