ACOLUMNS()
Contents
Purpose
Function to load column information from the current cursor/workarea into an array and return a reference to the array
Syntax
ACOLUMNS()
See Also
AADD(), AAVERAGE(), ACOPY(), ADATABASES(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM ARRAY, ARRAY(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), ATABLES(), COPY TO ARRAY, DATABASE(), DECLARE, DIMENSION, DIR, FDATE(), FILE(), GATHER, IN_ARRAY(), IS_ARRAY(), LIST FILES, LOCAL, OPEN DATABASE, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER
Description
The ACOLUMNS() function loads the column information from the current cursor/workarea detailed in the table below into the 19 columns of an array _ACOLUMNS and returns a reference to the array. Each row in the array corresponds to a column in the table.
| Column | Information | Data Type |
|---|---|---|
| 1 | Column name | Character |
| 2 | Field type:
C = Character Y = Currency D = Date T = DateTime B = Double F = Float G = General I = Integer L = Logical M = Memo N = Numeric Q = Varbinary V = Varchar and Varchar (Binary) W = Blob |
Character |
| 3 | Column width | Numeric |
| 4 | Decimal places | Numeric |
| 5 | Null values allowed | Logical |
| 6 | Code page translation not allowed | Logical |
| 7 | Column validation expression | Character |
| 8 | Column validation text | Character |
| 9 | Column default value | Character |
| 10 | Column validation expression | Character |
| 11 | Column validation text | Character |
| 12 | Long table name | Character |
| 13 | Insert trigger expression | Character |
| 14 | Update trigger expression | Character |
| 15 | Delete trigger expression | Character |
| 16 | Table comment | Character |
| 17 | NextValue for autoincrementing | Numeric |
| 18 | Step for autoincrementing | Numeric |
| 19 | Column Description | Character |
Example
open database southwind use shippers ashippers = acolumns()