|
|
|
|
|
- Detailed information about the columns
- Tip: How can I speed up the execution time of the SQLColumn function?
SQLColumn (Function) In french: SQLColonne Returns the characteristics of all the columns (or items): - for a given table.
- for a given query.
Numéro_Connexion is int
Numéro_Connexion = SQLConnect(NomSource, "", "", "", "ODBC")
i is int
i = LISTE_ListeTab
IF i <> -1 THEN
ListAdd(LISTE_Liste1, SQLColumn(Numéro_Connexion, LISTE_ListeTab[i]))
END
Syntax
Columns of a given query Hide the details
<Result> = SQLColumn(<Query name> [, <Details>])
<Result>: Character string - If <Details> is set to False, the character string contains the name of each table column separated by CR characters (Carriage Return):
Column1 + RC + Column2 + RC + ... + ColumnN - If <Details> is set to True, the character string contains the name of each table column along with various information about the column (name, type, size):
ColumnName + TAB + Type1 (N/T) + TAB + Type2 (number) + TAB + Size + CR This format is presented in the Remarks.
<Query name>: Character string Name of the query (executed with SQLExec or SQLExecWDR) for which we want to get the columns. <Details>: Optional boolean - True for a detailed result,
- False (default option) for a simple result.
Remarks Detailed information about the columns If <Details> is set to True, the character string contains the names of all the columns of a table with various information about these columns (name, type, size) in the following format: Column_Name + TAB + Type 1 (N/T) + TAB + Type 2 (number) + TAB + Size - Type 1 (N/T): "N" numeric column, "T" text column
- Type 2: internal number indicating the exact type of column (see array)
| | | Type 1 | Type 2 | ODBC type |
---|
N | 1 | SQL_BIT: Bit | N | 2 | SQL_TINYINT: Integer | N | 3 | SQL_BIGINT: Long integer | N | 4 | SQL_LONGVARBINARY: Binary memo type | N | 5 | SQL_VARBINARY: Variable-size binary string | N | 6 | SQL_BINARY: Binary | T | 7 | SQL_LONGVARCHAR: ASCII string memo | T | 9 | SQL_CHAR: Fixed-length string | N | 10 | SQL_NUMERIC: Numerical | N | 11 | SQL_DECIMAL: Decimal number | N | 12 | SQL_INTEGER: Integer | N | 13 | SQL_SMALLINT: Integer | N | 14 | SQL_FLOAT: Double real | N | 15 | SQL_REAL: Simple real | N | 16 | SQL_DOUBLE: Double real | T | 17 | SQL_DATE: Date | T | 18 | SQL_TIME: Time | T | 19 | SQL_TIMESTAMP: Date time | T | 20 | SQL_VARCHAR: Variable-size string | T | 0 | SQL_WCHAR: variable-size Unicode string | T | -2 | SQL_WLONGVARCHAR: Unicode memo |
- Size: Displayable size of column: for strings, size of string, and for numericals, size of numerical in bytes.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|