PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Detailed information about the columns
  • Tip: How to speed up the execution time of SQLColumn?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the characteristics of all the columns (or items):
  • for a given table.
  • for a given query.
Versions 16 and later
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code The SQL functions are used to handle the local databases (such as Web SQL databases). See Accessing a database in local mode (SQLite) for more details.
WEBDEV - Browser code SQLColumn only returns the characteristics of columns for a given query. A result must have been returned by the query to get the query characteristics.
New in version 16
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code The SQL functions are used to handle the local databases (such as Web SQL databases). See Accessing a database in local mode (SQLite) for more details.
WEBDEV - Browser code SQLColumn only returns the characteristics of columns for a given query. A result must have been returned by the query to get the query characteristics.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code The SQL functions are used to handle the local databases (such as Web SQL databases). See Accessing a database in local mode (SQLite) for more details.
WEBDEV - Browser code SQLColumn only returns the characteristics of columns for a given query. A result must have been returned by the query to get the query characteristics.
Versions 19 and later
Android Widget This function is now available in Android Widget mode (accessing the external databases via a Webservice).
Android This function is now available for the Android applications (accessing the external databases via a Webservice).
iPhone/iPad This function is now available for the iPhone/iPad applications (accessing the external databases via a Webservice).
New in version 19
Android Widget This function is now available in Android Widget mode (accessing the external databases via a Webservice).
Android This function is now available for the Android applications (accessing the external databases via a Webservice).
iPhone/iPad This function is now available for the iPhone/iPad applications (accessing the external databases via a Webservice).
Android Widget This function is now available in Android Widget mode (accessing the external databases via a Webservice).
Android This function is now available for the Android applications (accessing the external databases via a Webservice).
iPhone/iPad This function is now available for the iPhone/iPad applications (accessing the external databases via a Webservice).
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Connection to a database
Connection_Number is int
Connection_Number = SQLConnect(SourceName, "", "", "", "ODBC")
i is int
// LIST_TableList is a list containing the list of tables
i = LIST_TableList
IF i <> -1 THEN
ListAdd(LIST_List1, SQLColumn(Connection_Number, LIST_TableList[i]))
END
Syntax
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjaxUser code (UMC)HFSQLHFSQL Client/ServerHyper File 5.5OLE DBODBCNative Accesses

Columns of a given table Hide the details

<Result> = SQLColumn(<Connection Number> , <Table Name> [, <Details>])
<Result>: Character string
Name of the table columns.
  • If <Details> is set to True, the character string contains the name of each table column separated by CRs:
    Column1 + CR + Column2 + CR + ... + 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.
Java The results regarding the types and the sizes of columns may differ from the results returned in WINDEV.
<Connection Number>: Integer
Number of the connection to use, returned by SQLConnect.
<Table Name>: Character string (with quotes)
Name of the table whose columns are requested.
<Details>: Optional boolean
  • True (default option) for a detailed result,
  • False for a simplified result.

Columns of a given query Hide the details

<Result> = SQLColumn(<Query Name> [, <Details>])
<Result>: Character string
  • If <Details> is set to True, the character string contains the name of each table column separated by CR characters (Carriage Return):
    Column1 + CR + Column2 + CR + ... + 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.
Java The results regarding the types and the sizes of columns may differ from the results returned in WINDEV.
Versions 16 and later
WEBDEV - Browser code Caution: The characteristics of the columns cannot be known if no result was returned by the query.
New in version 16
WEBDEV - Browser code Caution: The characteristics of the columns cannot be known if no result was returned by the query.
WEBDEV - Browser code Caution: The characteristics of the columns cannot be known if no result was returned by the query.
<Query Name>: Character string
Name of the query (run by SQLExec or SQLExecWDR) whose columns are requested.
Versions 16 and later
WEBDEV - Browser code Only the queries created and run by SQLExec are available.
New in version 16
WEBDEV - Browser code Only the queries created and run by SQLExec are available.
WEBDEV - Browser code Only the queries created and run by SQLExec are available.
<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 along with some 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" for numeric column, "T" for text column
  • Type 2: internal number indicating the exact type of the column (see the table)
    Type 1Type 2ODBC type
    N1SQL_BIT: Bit
    N2SQL_TINYINT: Integer
    N3SQL_BIGINT: Long integer
    N4SQL_LONGVARBINARY: Binary memo
    N5SQL_VARBINARY: Variable-length binary string
    N6SQL_BINARY: Binary
    T7SQL_LONGVARCHAR: ASCII string memo
    T9SQL_CHAR: Fixed-size string
    N10SQL_NUMERIC: Numeric
    N11SQL_DECIMAL: Decimal number
    N12SQL_INTEGER: Integer
    N13SQL_SMALLINT: Integer
    N14SQL_FLOAT: Double real
    N15SQL_REAL: Simple real
    N16SQL_DOUBLE: Double real
    T17SQL_DATE: Date
    T18SQL_TIME: Time
    T19SQL_TIMESTAMP: Date time
    T20SQL_VARCHAR: Variable-length string
    T0SQL_WCHAR: Variable-length Unicode string
    T-2SQL_WLONGVARCHAR: Unicode memo
  • Size: Displayable size of the column: size of the string for the character strings and size of the numeric value (in bytes) for the numeric values.
Versions 16 and later
WEBDEV - Browser code In browser code:
  • Only two types are supported:
    Type 1Type 2ODBC type
    N16SQL_DOUBLE: Double real
    T0SQL_WCHAR: Variable-length Unicode string
  • the size is empty.
Reminder: The characteristics of the columns cannot be known if no result was returned by the query.
New in version 16
WEBDEV - Browser code In browser code:
  • Only two types are supported:
    Type 1Type 2ODBC type
    N16SQL_DOUBLE: Double real
    T0SQL_WCHAR: Variable-length Unicode string
  • the size is empty.
Reminder: The characteristics of the columns cannot be known if no result was returned by the query.
WEBDEV - Browser code In browser code:
  • Only two types are supported:
    Type 1Type 2ODBC type
    N16SQL_DOUBLE: Double real
    T0SQL_WCHAR: Variable-length Unicode string
  • the size is empty.
Reminder: The characteristics of the columns cannot be known if no result was returned by the query.
WINDEVWEBDEV - Server codeReports and QueriesJavaPHPAjax

Tip: How to speed up the execution time of SQLColumn?

The name of the table must be prefixed by the owner: the result will be nearly immediate:
SQLColumn(ConnectionNum, OWNER.CUSTOMER)
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment