SQLLanguages - Get SQL dialect or conformance information

SQLLanguages() returns SQL dialect or conformance information. The information is returned in an SQL result set, which can be retrieved using the same functions that are used to fetch a result set generated by a SELECT statement.

Syntax

SQLRETURN SQLLanguages  (SQLHSTMT       hstmt);

Function arguments

Table 1. SQLLanguages arguments
Data type Argument Use Description
SQLHSTMT hstmt Input Statement handle

Usage

The function returns dialect and conformance information, in the form of a result set on StatementHandle. This contains a row for every conformance claim the SQL product makes (including subsets defined for ISO and vendor-specific versions). For a product that claims to comply with this specification, the result set thus contains at least one row.

Rows defining ISO standard and vendor-specific languages can exist in the same table. Each row has at least these columns and, if it makes an X/Open SQL conformance claim, the columns contains these values.
Table 2. Columns returned by SQLLanguages
Column number/name Data type Description
1 SOURCE VARCHAR(254), NOT NULL The organization that defined this SQL version.
2 SOURCE_YEAR VARCHAR(254) The year the relevant source document is approved.
3 CONFORMANCE VARCHAR(254) The conformance level to the relevant document that the implementation claims.
4 INTEGRITY VARCHAR(254) An indication of whether the implementation supports the Integrity Enhancement Feature (IEF).
5 IMPLEMENTATION VARCHAR(254) A character string, defined by the vendor, that uniquely identifies the vendor's SQL product.
6 BINDING_SYTLE VARCHAR(254) Either 'EMBEDDED', 'DIRECT', OR 'CLI'.
7 PROGRAMMING_LANG VARCHAR(254) The host language for which the binding style is supported.

Return codes

  • SQL_SUCCESS
  • SQL_SUCCESS_WITH_INFO
  • SQL_ERROR
  • SQL_INVALID_HANDLE

Diagnostics

Table 3. SQLLanguages SQLSTATEs
SQLSTATE Description Explanation
24000 Cursor state that is not valid Cursor related information is requested, but no cursor is open.
40003 * Statement completion unknown The communication link between the CLI and the data source fails before the function completes processing.
HY001 Memory allocation failure The driver is unable to allocate memory required to support the processing or completion of the function.
HY009 String or buffer length that is not valid The value of one of the name length arguments is less than 0, but not equal SQL_NTS.
HYC00 Driver not capable DB2® for i CLI does not support catalog as a qualifier for table name.