SQL DESCRIBE CONNECTION Statement |

< > Status Inquiry Statements Connection Statements Example Flow Chart Table of Contents

The SQL DESCRIBE CONNECTION statement returns a group that describes an established InstantSQL connection to a data source.

ConnectionHandle (input). This argument must specify a numeric integer value with at least six digits of precision. The value identifies the connection that is to be described. This value must have been returned by a successful SQL CONNECT DATASOURCE statement.

ConnectionDescGroup (output). This argument must refer to a group data item that has the same data description as either sql-Connection-Description or sql-Connection-Description-Ext defined in the copy file lisqldef.cpy. The description of the connection is stored in the specified group data item.

The SQL DESCRIBE CONNECTION statement can be used to return a brief connection description or an extended connection description. If sql-Connection-Description, or another group with the same description, is specified for the ConnectionDescGroup argument, then the brief form of the connection description is returned. If sql-Connection-Description-Ext, or another group with the same description, is specified for the ConnectionDescGroup argument, then the extended form of the connection description is returned.

The data description entries for the elementary items of an sql-Connection-Description group are provided in the copy file lisqldcn.cpy. The meanings of the values returned in an sql-Connection-Description group are as follows:

20 sql-ConDSSrvrNameGroup.
24 sql-ConDSSrvrNameLength PIC S9(04) LEADING.
24 sql-ConDSSrvrName PIC X(sql-DSSrvrNameSize).

The value of sql-ConDSSrvrNameLength is the length of the server name contained in the sql-ConDSSrvrName data item, which follows.

The value of sql-ConDSSrvrName is the server name for the data source.

20 sql-ConDSNameGroup.
24 sql-ConDSNameLength PIC S9(04) LEADING.
24 sql-ConDSName PIC X(sql-DSNSize).

The value of sql-ConDSNameLength is the length of the data source name contained in the sql-ConDSName data item, which follows.

The value of sql-ConDSName is the data source name for the connection.

20 sql-ConHDBC PIC S9(18) LEADING.

The value of sql-ConHDBC is the ODBC connection handle.

20 sql-ConHENV PIC S9(18) LEADING.

The value of sql-ConHENV is the ODBC environment handle.

20 sql-ConNoQueries PIC S9(06) LEADING.

The value of sql-ConNoQueries is the number of InstantSQL queries currently associated with the connection.

20 sql-ConParamSQLTypeReq PIC 9(01).
88 sql-ConIsParamSQLTypeReq VALUE 1 FALSE 0.

The value of sql-ConParamSQLTypeReq indicates whether parameter SQL data types are required or ignored in the SQL BIND PARAMETER statement. The value 1 indicates parameter SQL data types are required. A value of 0 indicates the SQL data type is ignored because the driver for the connection supports the SQLDescribeParameter function.

An sql-Connection-Description-Ext group includes the items described for an sql-Connection-Description group plus an extension set of items. The data description entries for the elementary items of the extension portion of the sql-Connection-Description-Ext group are provided in the copy file lisqlxcn.cpy. The meanings of the extension items in an sql-Connection-Description-Ext group are as follows:

20 sql-ConAccessibleProcedures PIC X(01).
88 sql-ConIsAccProcs VALUE "Y" FALSE "N".

The value of sql-ConAccessibleProcedures is "Y" if the user may execute all procedures returned by the SQL QUERY PROCEDURES statement. Its value is "N" if there can be procedures returned that the user may not execute.

20 sql-ConAccessibleTables PIC X(01).
88 sql-ConIsAccTables VALUE "Y" FALSE "N".

The value of sql-ConAccessibleTables is "Y" if the user is guaranteed SELECT privileges to all tables returned by the SQL QUERY TABLES statement. Its value is "N" if there can be tables returned that the user may not access.

20 sql-ConActiveEnvironments PIC 9(04).

The value of sql-ConActiveEnvironments specifies the maximum number of active environments that the driver can support. If there is no specified limit or the limit is unknown, this value is zero.

20 sql-ConCatalogLocation PIC 9(04).
88 sql-ConCL-IsNotSupported VALUE 0.
88 sql-ConCL-IsStart VALUE sql-CL-Start.
88 sql-ConCL-IsEnd VALUE sql-CL-End.

The value of sql-ConCatalogLocation indicates the position of the catalog name in a qualified table name.

For example, an Xbase driver returns sql-CL-Start because the directory (catalog) name is at the start of the table name, as in \EMPDATA\EMP.DBF. An ORACLE Server driver returns sql-CL-End, because the catalog is at the end of the table name, as in ADMIN.EMP@EMPDATA.

An SQL92 Full level conformant driver will always return sql-CL-Start.

A value of 0 is returned if catalogs are not supported by the data source. However, to find out whether catalogs are supported, an application should use sql-ConCatalogName.

20 sql-ConCatalogName PIC X(01).
88 sql-ConIsAccTables VALUE "Y" FALSE "N".

The value of sql-ConCatalogName is "Y" if the server supports catalog names. Its value is "N" if the server does not support catalog names.

An SQL92 Full level conformant driver will always return "Y".

20 sql-ConCatalogNameSepGroup.
24 sql-ConCatalogNameSepLength PIC S9(04) LEADING.
24 sql-ConCatalogNameSep PIC X(10).

The value of sql-ConCatalogNameSepLength is the length of the catalog name separator string in the sql-ConCatalogNameSep data item, which follows. A value of zero is returned if catalogs are not supported by the data source. However, to find out whether catalogs are supported, an application should check the value of sql-ConCatalogName.

The value of sql-ConCatalogNameSep is the character or characters that the data source defines as the separator between a catalog name and the qualified name element that follows or precedes it. A string of all spaces is returned if catalogs are not supported by the data source.

An SQL92 Full level conformant driver will always return ".".

20 sql-ConCatalogTermGroup.
24 sql-ConCatalogTermLength PIC S9(04) LEADING.
24 sql-ConCatalogTerm PIC X(50).

The value of sql-ConCatalogTermLength is the length of the catalog term in the sql-ConCatalogTerm, which follows. A value of zero is returned if catalogs are not supported by the data source. However, to find out whether catalogs are supported, an application should check the value of sql-ConCatalogName.

The value of sql-ConCatalogTerm is the data source vendors name for a catalog; for example, "database" or "directory". This string may be in upper, lower, or mixed case. A string of all spaces is returned if catalogs are not supported by the data source.

An SQL92 Full level conformant driver will always return "catalog".

20 sql-ConCollationSeqNameGroup.
24 sql-ConCollationSeqNameLength PIC S9(04) LEADING.
24 sql-ConCollationSeqName PIC X(50).

The value of sql-ConCollationSeqNameLength is the length of the collation sequence name in the sql-ConCollationSeqName data item, which follows. If the collation sequence name is unknown, a value of zero will be returned.

The value of sql-ConCollationSeqName is the name of the collation sequence. This is a character string that indicates the name of the default collation for the default character set for this server (for example "ISO 8859-1" or "EBCDIC"). If this is unknown, a string of all spaces will be returned.

An SQL92 Full level conformant driver will always return a non-empty string.

20 sql-ConColumnAlias PIC X(01).
88 sql-ConIsColAliasSupported VALUE "Y" FALSE "N".

The value of sql-ConColumnAlias is "Y" if the data source supports column aliases and "N" if the data source does not support column aliases.

A column alias is an alternate name that may be specified for a column in the select list by using an AS clause.

An SQL92 Entry level conformant driver will always return "Y".

20 sql-ConConcatNullBehavior PIC 9(04).
88 sql-ConCB-IsNull VALUE sql-CB-Null.
88 sql-ConCB-IsNonNull VALUE sql-CB-Non-Null.

The value of sql-ConConcatNullBehavior indicates how the data source handles the concatenation of NULL valued character data type columns with non-NULL valued character data type columns as follows:

sql-CB-Null if the result is NULL valued.

sql-CB-Non-Null if the result is the concatenation of the non-NULL valued column or columns.

An SQL92 Entry level conformant driver will always return sql-CB-Null.

20 sql-ConCorrelationName PIC 9(04).
88 sql-ConCN-IsNone VALUE sql-CN-None.
88 sql-ConCN-IsDifferent VALUE sql-CN-Different.
88 sql-ConCN-IsAny VALUE sql-CN-Any.

The value of sql-ConCorrelationName indicates whether table correlation names are supported as follows:

sql-CN-None if table correlation names are not supported.

sql-CN-Different if table correlation names are supported, but must differ from the names of the tables they represent.

sql-CN-Any if table correlation names are supported and may be any valid user-defined name.

An SQL92 Entry level conformant driver will always return sql-CN-Any.

20 sql-ConCursorCommitBehavior PIC 9(04).
88 sql-ConCB-IsDelete VALUE sql-CB-Delete.
88 sql-ConCB-IsClose VALUE sql-CB-Close.
88 sql-ConCB-IsPreserve VALUE sql-CB-Preserve.

The value of sql-ConCursorCommitBehavior indicates how a COMMIT operation affects cursors and prepared statements in the data source as follows:

sql-CB-Delete if the driver closes cursors and deletes prepared statements. To use the cursor again, the application must re-prepare and re-execute the statement. InstantSQL prepares the statement again automatically when the SQL START QUERY statement is executed.

sql-CB-Close if the driver closes cursors. For prepared statements, the application can re-execute the statement without re-preparing it.

sql-CB-Preserve if the driver preserves cursors in the same position as before the COMMIT operation. The application can continue to fetch data or it can close the cursor and re-execute the statement without re-preparing it.

20 sql-ConCursorRollbackBehavior PIC 9(04).
88 sql-ConCB-IsDelete VALUE sql-CB-Delete.
88 sql-ConCB-IsClose VALUE sql-CB-Close.
88 sql-ConCB-IsPreserve VALUE sql-CB-Preserve.

The value of sql-ConCursorRollbackBehavior indicates how a ROLLBACK operation affects cursors and prepared statements in the data source as follows:

sql-CB-Delete if the driver closes cursors and deletes prepared statements. To use the cursor again, the application must re-prepare and re-execute the statement. InstantSQL prepares the statement again automatically when the SQL START QUERY statement is executed.

sql-CB-Close if the drive closes cursors. For prepared statements, the application can re-execute the statement without re-preparing it.

sql-CB-Preserve if the driver preserves cursors in the same position as before the ROLLBACK operation. The application can continue to fetch data or it can close the cursor and re-execute the statement without re-preparing it.

20 sql-ConCursorSensitivity PIC 9(04).
88 sql-ConCS-IsUnspecified VALUE sql-CS-Unspecified.
88 sql-ConCS-IsInsensitive VALUE sql-CS-Insensitive.
88 sql-ConCS-IsSensitive VALUE sql-CS-Sensitive.

The value of sql-ConCursorSensitivity describes the support for cursor sensitivity as follows:

sql-Insensitive = All cursors on the statement handle show the result set without reflecting any changes made to it by any other cursor within the same transaction.

sql-Unspecified = It is unspecified whether cursors on the statement handle make visible the changes made to a result set by another cursor within the same transaction. Cursors on the statement handle may make visible none, some, or all such changes.

sql-Sensitive = Cursors are sensitive to changes made by other cursors within the same transaction.

An SQL92 Entry level conformant driver will always return the sql-Unspecified option as supported.

An SQL92 Full level conformant driver will always return the sql-Insensitive option as supported.

20 sql-ConDataSourceReadOnly PIC X(01).
88 sql-ConIsDSReadOnly VALUE "Y" FALSE "N".

The value of sql-ConDataSourceReadOnly is "Y" if the data source is set to read-only mode; otherwise, its value is "N".

This characteristic pertains only to the data source itself; it is not a characteristic of the driver that enables access to the data source. A driver that is read/write can be used with a data source that is read-only. If a driver is read-only, all of its data sources must be read-only, and must return "N".

20 sql-ConDatabaseNameGroup.
24 sql-ConDatabaseNameLength PIC S9(04) LEADING.
24 sql-ConDatabaseName PIC X(256).

The value of sql-ConDatabaseNameLength is the length of the database name in the sql-ConDatabaseName data item, which follows.

The value of sql-ConDatabaseName is a character string with the name of the current database in use if the data source defines a named object called "database".

20 sql-ConDBMSNameGroup.
24 sql-ConDBMSNameLength PIC S9(04) LEADING.
24 sql-ConDBMSName PIC X(256).

The value of is sql-ConDBMSNameLength the length of the DBMS product name in the sql-ConDBMSName data item, which follows.

The value of sql-ConDBMSName is a character string with the name of the DBMS product accessed by the driver.

20 sql-ConDBMSVersionGroup.
24 sql-ConDBMSVersionLength PIC S9(04) LEADING.
24 sql-ConDBMSVersion PIC X(50).

The value of sql-ConDBMSVersionLength is the length of the DBMS version string in the sql-ConDBMSVersion data item, which follows.

The value of sql-ConDBMSVersion is a character string indicating the version of the DBMS product accessed by the driver. The version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version. The driver must render the DBMS product version in this form, but may also append the DBMS product-specific version as well. For example, "04.01.0000 Rdb 4.1".

20 sql-ConDescribeParameter PIC X(01).
88 sql-ConIsDescribeParameter VALUE "Y" FALSE "N".

The value of sql-ConDescribeParameter is "Y" if parameters can be described; otherwise, its value is "N". An SQL92 Full level conformant driver will usually return "Y" because it will support the DESCRIBE INPUT statement. Because this does not directly specify the underlying SQL support, however, describing parameters may not be supported, even in a SQL92 Full level conformant driver.

20 sql-ConDMVersion PIC X(17).

The value of sql-ConDMVersion is a character string with the version of the Driver Manager. The version is of the form ##.##.######.####, where:

The first set of two digits is the major ODBC version.

The second set of two digits is the minor ODBC version.

The third set of six digits is the Driver Manager major build number.

The last set of four digits is the Driver Manager minor build number.

This information is available in this format only from a 3.x driver manager. Driver managers that conform to ODBC version 2.x or earlier do not support this information and InstantSQL will normally return all spaces. However, the driver manager version number is available in a different format in sql-ConODBCVer, which is returned for all driver managers.

20 sql-ConDriverNameGroup.
24 sql-ConDriverNameLength PIC S9(04) LEADING.
24 sql-ConDriverName PIC X(256).

The value of sql-ConDriverNameLength is the length of the driver file name string in the sql-ConDriverName data item, which follows.

The value of sql-ConDriverName is the file name of the driver used to access the data source.

20 sql-ConDriverODBCVersion PIC X(05).

The value of sql-ConDriverODBCVersion is a character string with the version of ODBC that the driver supports. The version is of the form ##.##, where the first two digits are the major version and the next two digits are the minor version. For ODBC version 3.5, these are 3 and 5, and the driver should return "03.50".

20 sql-ConDriverVersionGroup.
24 sql-ConDriverVersionLength PIC S9(04) LEADING.
24 sql-ConDriverVersion PIC X(50).

The value of sql-ConDriverVersionLength is the length of the driver version string in the sql-ConDriverVersion data item, which follows.

The value of sql-ConDriverVersion is the version of the driver and, optionally, a description of the driver. At a minimum, the version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version.

20 sql-ConExpressionsInOrderBy PIC X(01).
88 sql-ConIsExpInOrderBy VALUE "Y" FALSE "N".

The value of sql-ConExpressionsInOrderBy is "Y" if the data source supports expressions in the ORDER BY list; "N" if it does not.

20 sql-ConFileUsage PIC 9(04).
88 sql-ConIsFileNotSupported VALUE
sql-File-Not-Supported.
88 sql-ConIsFileTable VALUE sql-File-Table.
88 sql-ConIsFileCatalog VALUE sql-File-Catalog.

The value of sql-ConFileUsage indicates how a single-tier driver directly treats files in a data source as follows:

sql-File-Not-Supported if the driver is not a single-tier driver. For example, an ORACLE driver is a two-tier driver.

sql-File-Table if a single-tier driver treats files in a data source as tables. For example, an Xbase driver treats each Xbase file as a table.

sql-File-Catalog if a single-tier driver treats files in a data source as a catalog. For example, a Microsoft Access driver treats each Microsoft Access file as a complete database.

An application might use this to determine how users will select data. For example, Xbase users often think of data as stored in files, while ORACLE and Microsoft Access users generally think of data as stored in tables. When a user selects an Xbase data source, the application could display the Windows File Open common dialog box; when the user selects a Microsoft Access or ORACLE data source, the application could display a custom Select Table dialog box.

20 sql-ConGroupBy PIC 9(04).
88 sql-ConIsGBNotSupported VALUE sql-GB-Not-Supported.
88 sql-ConIsGBEqualsSelect VALUE sql-GB-Equals-Select.
88 sql-ConIsGBContainsSelect VALUE
sql-GB-Contains-Select.
88 sql-ConIsGBCollate VALUE sql-GB-Collate.

The value of sql-ConGroupBy specifies the relationship between the columns in the GROUP BY clause and the non-aggregated columns in the select list as follows:

sql-GB-Collate if a COLLATE clause may be specified at the end of each grouping column.

sql-GB-Not-Supported if GROUP BY clauses are not supported.

sql-GB-Equals-Select if the GROUP BY clause must contain all non-aggregated columns in the select list. It may not contain any other columns. For example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT.

sql-GB-Contains-Select if the GROUP BY clause must contain all non-aggregated columns in the select list. It may contain columns that are not in the select list. For example, SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT, AGE.

sql-GB-No-Relation if the columns in the GROUP BY clause and the select list are not related. The meaning of non-grouped, non-aggregated columns in the select list is data source dependent. For example, SELECT DEPT, SALARY FROM EMPLOYEE GROUP BY DEPT, AGE.

An SQL92 Entry level conformant driver will always return the sql-GB-Equals-Select option as supported.

An SQL92 Full level conformant driver will always return the sql-GB-Collate option as supported.

20 sql-ConIdentifierCase PIC 9(04).
88 sql-ConIsICUpper VALUE sql-IC-Upper.
88 sql-ConIsICLower VALUE sql-IC-Lower.
88 sql-ConIsICSensitive VALUE sql-IC-Sensitive.
88 sql-ConIsICMixed VALUE sql-IC-Mixed.

The value of sql-ConIdentifierCase indicates the case of identifiers in SQL statements as follows:

sql-IC-Upper if identifiers in SQL statements are not case-sensitive and are stored in uppercase in the system catalog.

sql-IC-Lower if identifiers in SQL statements are not case-sensitive and are stored in lowercase in the system catalog.

sql-IC-Sensitive if identifiers in SQL statements are case-sensitive and are stored in mixed case in the system catalog.

sql-IC-Mixed if identifiers in SQL statements are not case-sensitive and are stored in mixed case in the system catalog.

Because identifiers in SQL92 are never case-sensitive strings, a driver that conforms strictly to SQL92 (any level) will never return the sql-IC-Sensitive option.

20 sql-ConIdentifierQuoteCharGrp.
24 sql-ConIdentifierQuoteCharLen PIC S9(04) LEADING.
24 sql-ConIdentifierQuoteChar PIC X(10).

The value of sql-ConIdentifierQuoteCharLen is the length of the identifier quote character string in the sql-ConIdentifierQuoteChar data item, which follows.

The value of sql-ConIdentifierQuoteChar is the character string used as the starting and ending delimiter of a quoted (delimited) identifier in SQL statements. If the data source does not support quoted identifiers, a blank is returned.

Because the identifier quote character in SQL92 is the double quotation mark ("), a driver that conforms strictly to SQL92 will always return the double quotation mark character.

20 sql-ConIntegrity PIC X(01).
88 sql-ConIsIntegrity VALUE "Y" FALSE "N".

The value of sql-ConIntegrity is "Y" if the data source supports the Integrity Enhancement Facility; otherwise, its value is "N".

20 sql-ConLikeEscapeClause PIC X(01).
88 sql-ConIsLikeEscapeClause VALUE "Y" FALSE "N".

The value of sql-ConLikeEscapeClause is "Y" if the data source supports an escape character for the percent character (%) and underscore character (_) in a LIKE predicate and the driver supports the ODBC syntax for defining a LIKE predicate escape character; otherwise, its value is "N".

The ODBC syntax for defining a LIKE predicate escape character is {escape 'escape-character'}, for example:

SELECT NAME FROM DEPT WHERE NAME LIKE '\%AAA%' {escape '\'}

searches for names that begin with "%AAA".

20 sql-ConMaxBinaryLiteralLength PIC 9(10).

The value of sql-ConMaxBinaryLiteralLength specifies the maximum length (number of hexadecimal characters, excluding the literal prefix and suffix returned by the SQL QUERY TYPES statement) of a binary literal in an SQL statement. For example, the binary literal 0xFFAA has a length of 4. If there is no maximum length or the length is unknown, the value zero is returned.

20 sql-ConMaxCatalogNameLength PIC 9(04).

The value of sql-ConMaxCatalogNameLength specifies the maximum length of a catalog name in the data source. If there is no maximum length or the length is unknown, the value zero is returned.

A FIPS Full level conformant driver will return at least 128.

20 sql-ConMaxCharLiteralLength PIC 9(10).

The value of sql-ConMaxCharLiteralLength specifies the maximum length (number of characters, excluding the literal prefix and suffix returned by the SQL QUERY TYPES statement) of a character literal in an SQL statement. If there is no maximum length or the length is unknown, the value zero is returned.

20 sql-ConMaxColumnNameLength PIC 9(04).

The value of sql-ConMaxColumnNameLength specifies the maximum length of a column name in the data source. If there is no maximum length or the length is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 18.

A FIPS Intermediate level conformant driver will return at least 128.

20 sql-ConMaxColumnsInGroupBy PIC 9(04).

The value of sql-ConMaxColumnsInGroupBy specifies the maximum number of columns allowed in a GROUP BY clause. If there is no specified limit or the limit is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 6.

A FIPS Intermediate level conformant driver will return at least 15.

20 sql-ConMaxColumnsInIndex PIC 9(04).

The value of sql-ConMaxColumnsInIndex specifies the maximum number of columns allowed in an index. If there is no specified limit or the limit is unknown, the value zero is returned.

20 sql-ConMaxColumnsInOrderBy PIC 9(04).

The value of sql-ConMaxColumnsInOrderBy specifies the maximum number of columns allowed in an ORDER BY clause. If there is no specified limit or the limit is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 6.

A FIPS Intermediate level conformant driver will return at least 15.

20 sql-ConMaxColumnsInSelect PIC 9(04).

The value of sql-ConMaxColumnsInSelect specifies the maximum number of columns allowed in a select list. If there is no specified limit or the limit is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 100.

A FIPS Intermediate level conformant driver will return at least 250.

20 sql-ConMaxColumnsInTable PIC 9(04).

The value of sql-ConMaxColumnsInTable specifies the maximum number of columns allowed in a table. If there is no specified limit or the limit is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 100.

A FIPS Intermediate level conformant driver will return at least 250.

20 sql-ConMaxConcurrentActivities PIC 9(04).

The value of sql-ConMaxConcurrentActivities specifies the maximum number of active statements that the driver can support for a connection. A statement is defined as active if it has results pending, with the term results meaning rows from a SELECT operation or rows affected by an INSERT, UPDATE, or DELETE operation (such as a row count), or if it is in a NEED_DATA state. This value may reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, the value zero is returned.

20 sql-ConMaxCursorNameLength PIC 9(04).

The value of sql-ConMaxCursorNameLength specifies the maximum length of a cursor name in the data source. If there is no maximum length or the length is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 18.

A FIPS Intermediate level conformant driver will return at least 128.

20 sql-ConMaxDriverConnections PIC 9(04).

The value of sql-ConMaxDriverConnections specifies the maximum number of active connections that the driver can support for an environment. This value may reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, the value zero is returned.

20 sql-ConMaxIdentifierLength PIC 9(04).

The value of sql-ConMaxIdentifierLength specifies the maximum size in characters that the data source supports for user-defined names.

A FIPS Entry level conformant driver will return at least 18.

A FIPS Intermediate level conformant driver will return at least 128.

20 sql-ConMaxIndexSize PIC 9(10).

The value of sql-ConMaxIndexSize specifies the maximum number of bytes allowed in the combined fields of an index. If there is no specified limit or the limit is unknown, the value zero is returned.

20 sql-ConMaxProcedureNameLength PIC 9(04).

The value of sql-ConMaxProcedureNameLength specifies the maximum length of a procedure name in the data source. If there is no maximum length or the length is unknown, the value zero is returned.

20 sql-ConMaxRowSize PIC 9(10).

The value of sql-ConMaxRowSize specifies the maximum length of a single row in a table. If there is no specified limit or the limit is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 2,000.

A FIPS Intermediate level conformant driver will return at least 8,000.

20 sql-ConMaxRowSizeIncludesLong PIC X(01).
88 sql-ConIsMaxRowSizeIncLong VALUE "Y" FALSE "N".

The value of sql-ConMaxRowSizeIncludesLong is "Y" if the maximum row size returned in the sql-ConMaxRowSize data item includes the length of all sql-LongVarChar and sql-LongVarBinary columns in the row; otherwise, its value is "N".

20 sql-ConMaxSchemaNameLength PIC 9(04).

The value of sql-ConMaxSchemaNameLength specifies the maximum length of a schema name in the data source. If there is no maximum length or the length is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 18.

A FIPS Intermediate level conformant driver will return at least 128.

20 sql-ConMaxStatementLength PIC 9(10).

The value of sql-ConMaxStatementLength specifies the maximum length (number of characters, including white space) of an SQL statement. If there is no maximum length or the length is unknown, the value zero is returned.

20 sql-ConMaxTableNameLength PIC 9(04).

The value of sql-ConMaxTableNameLength specifies the maximum length of a table name in the data source. If there is no maximum length or the length is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 18.

A FIPS Intermediate level conformant driver will return at least 128.

20 sql-ConMaxTablesInSelect PIC 9(04).

The value of sql-ConMaxTablesInSelect specifies the maximum number of tables allowed in the FROM clause of a SELECT statement. If there is no specified limit or the limit is unknown, the value zero is returned.

A FIPS Entry level conformant driver will return at least 15.

A FIPS Intermediate level conformant driver will return at least 50.

20 sql-ConMaxUserNameLength PIC 9(04).

The value of sql-ConMaxUserNameLength specifies the maximum length of a user name in the data source. If there is no maximum length or the length is unknown, the value zero is returned.

20 sql-ConMultipleResultSets PIC X(01).
88 sql-ConIsMultResultSets VALUE "Y" FALSE "N".

The value of sql-ConMultipleResultSets is "Y" if the data source supports multiple result sets; otherwise, its value is "N".

20 sql-ConMultipleActiveTxn PIC X(01).
88 sql-ConIsMultActiveTxn VALUE "Y" FALSE "N".

The value of sql-ConMultipleActiveTxn is "Y" if the driver supports more than one active transaction at the same time. Its value is "N" if only one transaction may be active at any time. The information returned for this data item does not apply in the case of distributed transactions.

20 sql-ConNeedLongDataLength PIC X(01).
88 sql-ConIsNeedLongDataLength VALUE "Y" FALSE "N".

The value of sql-ConNeedLongDataLength is "Y" if the data source needs the length of a long data value (the data type is sql-LongVarChar, sql-LongVarBinary, or a long, data source specific data type) before that value is sent to the data source, otherwise, its value is "N".

20 sql-ConNonNullableColumns PIC 9(04).
88 sql-ConIsNoNonNullableCols VALUE sql-NNC-Null.
88 sql-ConIsNonNullableCols VALUE sql-NNC-Non-Null.

The value of sql-ConNonNullableColumns specifies whether the data source supports NOT NULL for columns as follows:

sql-NNC-Null if all columns must be nullable.

sql-NNC-Non-Null if columns may be non-nullable (the data source supports the NOT NULL column constraint in CREATE TABLE statements).

An SQL92 Entry level conformant driver will return sql-NNC-Non-Null.

20 sql-ConNullCollation PIC 9(04).
88 sql-ConIsNullCollHigh VALUE sql-NC-High.
88 sql-ConIsNullCollLow VALUE sql-NC-Low.
88 sql-ConIsNullCollStart VALUE sql-NC-Start.
88 sql-ConIsNullCollEnd VALUE sql-NC-End.

The value of sql-ConNullCollation specifies where NULLs are sorted in a result set as follows:

sql-NC-End if NULLs are sorted at the end of the result set, regardless of the ASC or DESC keywords.

sql-NC-High if NULLs are sorted at the high end of the result set, depending on the ASC or DESC keywords.

sql-NC-Low if NULLs are sorted at the low end of the result set, depending on the ASC or DESC keywords.

sql-NC-Start if NULLs are sorted at the start of the result set, regardless of the ASC or DESC keywords.

20 sql-ConODBCVer PIC X(10).

The value of sql-ConODBCVer is a character string with the version of ODBC to which the Driver Manager conforms. The version is of the form ##.##.0000, where the first two digits are the major version and the next two digits are the minor version.

The driver manager version number is available in a different format in sql-ConDMVersion for driver managers that conform to ODBC version 3.x and later.

20 sql-ConOrderByColumnsInSelect PIC X(01).
88 sql-ConIsOrderByColsInSelect VALUE "Y" FALSE "N".

The value of sql-ConOrderByColumnsInSelect is "Y" if the columns in the ORDER BY clause must be in the select list; otherwise, its value is "N".

20 sql-ConProcedureTermGroup.
24 sql-ConProcedureTermLength PIC S9(04) LEADING.
24 sql-ConProcedureTerm PIC X(50).

The value of sql-ConProcedureTermLength is the length of the procedure term string in the sql-ConProcedureTerm data item, which follows.

The value of sql-ConProcedureTerm is a character string with the data source vendors name for a procedure; for example, "database procedure", "stored procedure", "procedure", "package", or "stored query".

20 sql-ConProcedures PIC X(01).
88 sql-ConIsProceduresSupported VALUE "Y" FALSE "N".

The value of sql-ConProcedures is "Y" if the data source supports procedures and the driver supports the ODBC procedure invocation syntax; otherwise, its value is "N". The ODBC syntax for procedure invocations is as follows:

{[?=]call procedure-name [([parameter][,[parameter]])]}

where the braces ({}) and parentheses are literally part of the syntax and the brackets ([]) are metacharacters used to indicate optional elements of the syntax.

20 sql-ConQuotedIdentifierCase PIC 9(04).
88 sql-ConIsICUpper VALUE sql-IC-Upper.
88 sql-ConIsICLower VALUE sql-IC-Lower.
88 sql-ConIsICSensitive VALUE sql-IC-Sensitive.
88 sql-ConIsICMixed VALUE sql-IC-Mixed.

The value of sql-ConQuotedIdentifierCase indicates the case of quoted identifiers in SQL statements as follows:

sql-IC-Upper if quoted identifiers in SQL statements are not case-sensitive and are stored in uppercase in the system catalog.

sql-IC-Lower if quoted identifiers in SQL statements are not case-sensitive and are stored in lowercase in the system catalog.

sql-IC-Sensitive if quoted identifiers in SQL statements are case-sensitive and are stored in mixed case in the system catalog. (Note that in an SQL92-compliant database, quoted identifiers are always case-sensitive.)

sql-IC-Mixed if quoted identifiers in SQL statements are not case-sensitive and are stored in mixed case in the system catalog.

An SQL92 Entry level conformant driver will always return sql-IC-Sensitive.

20 sql-ConRowUpdates PIC X(01).
88 sql-ConIsRowUpdates VALUE "Y" FALSE "N".

The value of sql-ConRowUpdates is "Y" if a keyset-driven or mixed cursor maintains row versions or values for all fetched rows and therefore can detect any updates made to a row by any user since the row was last fetched. (This applies only to updates, not to deletions or insertions.) The driver can return the SQL_ROW_UPDATED flag to the row status array when SQLFetchScroll is called. Otherwise, its value is "N".

20 sql-ConSchemaTermGroup.
24 sql-ConSchemaTermLength PIC S9(04) LEADING.
24 sql-ConSchemaTerm PIC X(50).

The value of sql-ConSchemaTermLength is the length of the schema term string in the sql-ConSchemaTerm data item, which follows.

The value of sql-ConSchemaTerm is a character string with the data source vendors name for a schema; for example, "owner", "Authorization ID", or "Schema". The character string may be returned in upper, lower, or mixed case.

An SQL92 Entry level conformant driver will always return "schema".

20 sql-ConSearchPatternEscGroup.
24 sql-ConSearchPatternEscLength PIC S9(04) LEADING.
24 sql-ConSearchPatternEsc PIC X(10).

The value of sql-ConSearchPatternEscLength is the length of the search pattern escape string in the sql-ConSearchPatternEsc data item, which follows. If this value is zero, the driver does not support a search pattern escape.

The value of sql-ConSearchPatternEsc is a character string specifying what the driver supports as an escape that permits the use of the pattern match metacharacters underscore (_) and percent sign (%) as literal characters in search pattern strings. This escape applies only for those catalog function arguments that support search pattern strings (in InstantSQL, these are the TableName, SchemaName and ColumnName arguments for the SQL QUERY COLUMNS statement, the ProcedureName, SchemaName and ColumnName arguments for the SQL QUERY PROCEDURE-COLUMNS statement, the SchemaName and ProcedureName arguments for the SQL QUERY PROCEDURES statement, and the SchemaName and TableName arguments for the SQL QUERY TABLES statement).

Because this information does not indicate general support of the escape character in the LIKE predicate, SQL92 does not include requirements for this character string.

See the topic InstantSQL Search Patterns for more information on search patterns.

20 sql-ConServerNameGroup.
24 sql-ConServerNameLength PIC S9(04) LEADING.
24 sql-ConServerName PIC X(128).

The value of sql-ConServerNameLength is the length of the server name in the sql-ConServerName data item, which follows.

The value of sql-ConServerName is a character string with the actual data source specific server name. This name can differ from the name returned in sql-ConDSSrvrName. For example, in SQLServer 7.0, this server name is the name stored in the system tables. If the SQLServer data base is moved to a different server without manually updating the system tables, this name will return the prior server name. After updating the system tables, the server must be re-started to refresh the system table cache before the new server name will be returned for this item.

20 sql-ConTableTermGroup.
24 sql-ConTableTermLength PIC S9(04) LEADING.
24 sql-ConTableTerm PIC X(50).

The value of sql-ConTableTermLength is the length of the table term in the sql-ConTableTerm data item, which follows.

The value of sql-ConTableTerm is a character string with the data source vendors name for a table; for example, "table" or "file". This character string may be in upper, lower, or mixed case.

An SQL92 Entry level conformant driver will always return "table".

20 sql-ConTxnCapable PIC 9(04).
88 sql-ConIsTC-None VALUE sql-TC-None.
88 sql-ConIsTC-DML VALUE sql-TC-DML.
88 sql-ConIsTC-All VALUE sql-TC-All.
88 sql-ConIsTC-DDL-Commit VALUE sql-TC-DDL-Commit.
88 sql-ConIsTC-DDL-Ignore VALUE sql-TC-DDL-Ignore.

The value of sql-ConTxnCapable describes the transaction support in the driver or data source as follows:

sql-TC-None if transactions are not supported.

sql-TC-DML if transactions may only contain Data Manipulation Language (DML) statements (SELECT, INSERT, UPDATE, DELETE). Data Definition Language (DDL) statements encountered in a transaction cause an error.

sql-TC-DDL-Commit if transactions may only contain DML statements. DDL statements (CREATE TABLE, DROP INDEX, and so on) encountered in a transaction cause the transaction to be committed.

sql-TC-DDL-Ignore if transactions may only contain DML statements. DDL statements encountered in a transaction are ignored.

sql-TC-All if transactions may contain DDL statements and DML statements in any order.

Because support of transactions is mandatory in SQL92, an SQL92 conformant driver (any level) will never return sql-TC-None.

20 sql-ConUserNameGroup.
24 sql-ConUserNameLength PIC S9(04) LEADING.
24 sql-ConUserName PIC X(50).

The value of sql-ConUserNameLength is the length of the user name in the sql-ConUserName data item, which follows.

The value of sql-ConUserName is a character string with the name used in a particular database, which may be different from the login name.

SQL DESCRIBE CONNECTION Statement Example:

SQL DESCRIBE CONNECTION
sql-ConnectionHandle,
sql-Connection-Description.

Copyright ©2000 Liant Software Corp. All rights reserved.