17. Forms Statements : inquire_frs Statement—Retrieve FRS Runtime Information : Retrieving Information about a Column
 
Share this page                  
Retrieving Information about a Column
The column object type is used to obtain information about a column in a table field. The syntax is:
inquire_frs column formname tablename
     (variable = frs_constant[(columnname)]
     {,variable = frs_constant[(columnname)]})
Formname identifies the form that contains the specified table field, and columnname identifies the column in the specified table field. If formname and tablename are left as null strings and columnname is not specified after the constant, then the column on which the cursor is currently resting is assumed. This format is particularly useful within the tabledata loop. You can use quoted or unquoted string literals or program variables to represent formname, tablename, and columnname.
Valid values for frs_constant are listed in the following table:
Frs_constant
Data Type
Returns
color
integer
Returns the color code (0-7) for the column. The default color is 0.
columns
integer
Returns the width of the table field column as defined by its display format. Formname and tablename must be quoted blank or empty strings.
datatype
integer
Returns the true data type of field:
 
date
money
decimal
char
varchar
integer
float
c
text
3
5
10
20
21
30
31
32
37
 
 
Nullable data types are returned as the negative value of the non-nullable ones. For example, a nullable integer data type returns -30.
Derivation_string
character
Returns the derivation string for the specified column. If the column is not a derived field, then this returns an empty string.
derived
integer
Returns 1 if the specified column is a derived field, or 0 if it is not.
display
integer
Returns 1 if the specified display attribute is on for the column or a 0 if it is not. Display can be any of the following constants:
reverse
blink
underline
intensity
normal
displayonly
invisible
Normal returns 1 if no attributes are in effect for the column or 0 if any attribute is in effect; the settings of the displayonly and invisible attributes do not affect the value returned for the normal constant. To set the display attributes for columns, use the set_frs statement.
exists
integer
Returns 1 if the specified column exists, 0 if the column does not exist.
format
character
Returns the format string specified for the column.
length
integer
Returns the length, in bytes, of the data area in the column.
mode
character
Returns the mode of display for the column as specified (fill, query or read).
name
character
Returns the name of the column. Because this constant always refers to the current table field column, it is not necessary to specify a columnname.
number
integer
Returns the column's sequence number within the table (numbering begins at 1).
rows
integer
Returns the number of lines defined by the display format of the column. Formname and tablename must be quoted blank or empty strings.
type
integer
Returns the basic type of column (1=integer, 2=float or money or decimal, 3=varchar or char or c or text or date).
valid
character
Returns the validation string defined for the column.