3.1 SQLGetInfo()

Table of Contents Previous Next



The ODBC SQLGetInfo() function returns information about the EDB-ODBC driver and Advanced Server. You must have an open connection to call SQLGetInfo(), unless you specify SQL_ODBC_VER as the info_type. The signature for SQLGetInfo() is:
SQLHDBC conn_handle, // Input
SQLUSMALLINT info_type, // Input
SQLPOINTER info_pointer, // Output
SQLSMALLINT buffer_len, // Input
SQLSMALLINT *string_length_pointer // Output
The type of information SQLGetInfo() is retrieving.
If the info_type argument is SQL_DRIVER_HDESC or SQL_DRIVER_HSTMT, the info_pointer argument is both Input そして Output
buffer_len is the length of the allocated memory buffer pointed to by info_pointer. If info_pointer is NULL, buffer_len is ignored. If the returned value is a fixed size, buffer_len is ignored. buffer_len is only used if the requested value is returned in the form of a character string.
string_length_pointer is a pointer to an SQLSMALLINT value. SQLGetInfo() writes the size of the requested value in this integer.
A typical usage is to call SQLGetInfo() with a NULL info_pointer to obtain the length of the requested value, allocate the required number of bytes, and then call SQLGetInfo() again (providing the address of the newly allocated buffer) to obtain the actual value. The first call retrieves the number of bytes required to hold the value; the second call retrieves the value.
If the size of the returned value exceeds buffer_len, the information is truncated and NULL terminated. If the returned value is a fixed size, string_length is ignored (and the size of the requested value is not provided by SQLGetInfo()).
SQLGetInfo() writes information in one of the following formats:
a SQLUINTEGER bitmask
a SQLUINTEGER flag
a SQLUINTEGER binary value
a SQLUSMALLINT value
a NULL terminated character string
SQLGetInfo() returns SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
SQL info_type Argument
Indicates if procedures returned by SQLProcedures()can be executed by the application.
Some procedures executed by the SQLProcedures() function may be executed by the application.
Indicates if the user has SELECT privileges on all table names returned by SQLTables().
prev. SQL_MAX_DRIVER_CONNECTIONS
Returns SQL_AF_ALL
Identifies the ALTER DOMAIN clauses supported by the server.
ALTER DOMAIN clauses are not supported.
Identifies the ALTER TABLE clauses supported by the server.
Returns SQL_AM_NONE
Returns SQL_BRC_EXPLICIT
Now SQL_QUALIFIER_LOCATION
Returns SQL_CL_START
Now SQL_QUALIFIER_NAME
Now SQL_QUALIFIER_NAME_SEPARATOR
Now SQL_QUALIFIER_TERM
Returns catalog
Now SQL_QUALIFIER USAGE
Returns SQL_CU_DML_STATEMENTS
Catalog names can be used in SELECT, INSERT, UPDATE, DELETE, SELECT FOR UPDATE and positioned UPDATE そして DELETE statements.
Returns SQL_CB_NON_NULL
Concatenation of a NULL value and a non NULL value will result in a NULL value.
Indicates conversion support from the BIGINT type using the CONVERT function.
Indicates conversion support from the BINARY type using the CONVERT function.
Indicates conversion support from the BIT type using the CONVERT function.
Indicates conversion support from the CHAR type using the CONVERT function.
Indicates conversion support from the DECIMAL type using the CONVERT function.
Indicates conversion support from the DOUBLE type using the CONVERT function.
Indicates conversion support from, the FLOAT type using the CONVERT function.
Lists the conversion support from the INTEGER type using the CONVERT function.
Indicates conversion support from the INTERVAL_DAY_TIME type using the CONVERT function.
Indicates conversion support from the INTERVAL_YEAR_MONTH type using the CONVERT function.
Indicates conversion support for the LONG_VARBINARY type using the CONVERT function.
Indicates conversion support for the LONGVARCHAR type using the CONVERT function.
Indicates conversion support for the NUMERIC type using the CONVERT function.
Indicates conversion support for the REAL type using the CONVERT function.
Indicates conversion support for the SMALLINT type using the CONVERT function.
Indicates conversion support for TIME type using the CONVERT function.
Indicates conversion support for TIMESTAMP type using the CONVERT function.
Indicates conversion support for the TINYINT type using the CONVERT function.
Indicates conversion support for the VARBINARY type using the CONVERT function.
Indicates conversion support for VARCHAR type using the CONVERT function.
Indicates conversion support for the WCHAR type using the CONVERT function.
This info_type is valid only when using the Unicode driver.
Indicates conversion support for the WLONGVARCHAR type using the CONVERT function.
This info_type is valid only when using the Unicode driver.
Indicates conversion support for the WVARCHAR type using the CONVERT function.
This info_type is valid only when using the Unicode driver.
Returns SQL_CN_ANY
Indicates support for the CREATE ASSERTION statement.
The CREATE ASSERTION statement is not supported.
Indicates support for CREATE CHARACTER statement.
The CREATE CHARACTER statement is not supported.
Indicates support for the CREATE COLLATION.
The CREATE COLLATION statement is not supported.
Indicates support for the CREATE DOMAIN statement.
The CREATE DOMAIN statement is not supported.
Indicates support for the CREATE SCHEMA statement.
Indicates support for the CREATE TABLE statement.
Indicates support for the CREATE TRANSLATION statement.
The CREATE TRANSLATION statement is not supported.
Indicates support for the CREATE VIEW statement.
Returns SQL_CV_CREATE_VIEW
Indicates how a COMMIT operation affects the cursor.
Returns SQL_CB_PRESERVE
Returns SQL_CB_PRESERVE
Indicates the DATETIME LITERALS supported by the server.
This info_type is not supported.
Returns the value given by the dbms_name parameter from the odbc.ini file on Linux or the dbms_name field of page 2 of the Advanced Options dialog box when defining a data source in Windows. The default is EnterpriseDB
Returns TXN_READ_COMMITTED
Indicates support for the DESCRIBE INPUT statement.
The DESCRIBE INPUT statement is not supported.
Returns an SQLULEN value that contains the driver’s connection handle.
Returns an SQLULEN value that contains driver’s descriptor handle.
Returns an SQLULEN value that contains the driver’s environment handle.
Returns an SQLULEN value that contains the library handle (returned to the ODBC driver manager when the manager loaded the driver).
Returns an SQLULEN value that contains the driver’s statement handle.
Returns EDB-ODBC.DLL
Returns 9.0.0.6
Lists the DROP ASSERTION clauses supported by the server.
Lists the DROP CHARACTER clauses supported by the server.
Lists the DROP COLLATION clauses supported by the server.
Lists the DROP DOMAIN clauses supported by the server.
Lists the DROP SCHEMA clauses supported by the server.
Lists the DROP TABLE clauses supported by the server.
Lists the DROP TRANSLATION clauses supported by the server.
Lists the DROP VIEW clauses supported by the server.
Indicates FETCH order options (deprecated in ODBC 3.0).
Returns SQL_FILE_NOT_SUPPORTED
Returns SQL_CA1_NEXT
Indicates the relationship between a GROUP BY clause and columns in the SELECT list.
Returns SQL_GB_GROUP_BY_EQUALS_SELECT
Returns SQL_IC_LOWER
Indicates support for the CREATE INDEX statement.
Returns SQL_IK_NONE
Prev. SQL_ODBC_SQL_OPT_IEF
Returns SQL_LCK_NO_CHANGE
This info_type is currently unsupported.
prev. SQL_MAX_ACTIVE_STATEMENTS
A cursor name cannot exceed 32 characters in length.
prev. SQL_ACTIVE_CONNECTIONS
Identifiers cannot exceed 64 characters in length.
Now SQL_MAX_SCHEMA_NAME_LEN
Now SQL_MAX_CATALOG_NAME_LEN
Indicates whether the SQL_MAX_ROW_SIZE includes the length of any LONGVARCHAR or LONGVARBINARY columns in the row.
SQL_MAX_ROW_SIZE includes the length of any LONGVARCHAR or LONGVARBINARY columns in the row.
The maximum number of tables allowed in the FROM clause of a SELECT statement.
Indicates if the server needs the length of a LONG data value before receiving the value.
Indicates if the server supports NOT NULL values in columns.
Returns SQL_NNC_NON_NULL
Advanced Server does support NOT NULL values in columns.
Indicates where NULL values are located in a result set.
Returns SQL_NC_HIGH
The location of NULL values in a data set is determined by the ASC そして DESC keywords; NULL values are sorted to the high end of the data set.
Returns SQL_OAC_LEVEL1
Returns SQL_OIC_CORE
Returns SQL_OSCC_NOT_COMPLIANT
The driver is not SAG CLI compliant.
Returns SQL_OSC_CORE
Now SQL_INTEGRITY
Returns 03.52.0000
Returns SQL_OJ_LEFT
prev. SQL_SCHEMA_TERM
Returns schema
Indicates if the columns in an ORDER BY clause must be included in the SELECT list.
Columns in an ORDER BY clause do not have to be in the SELECT list.
prev. SQL_SCHEMA_USAGE
Returns SQL_OU_DML_STATEMENTS
Returns SQL_PARC_BATCH
Returns SQL_PARC_NO_BATCH if a single, cumulative row count is available for the entire array.
Returns SQL_PAS_BATCH
Returns procedure
prev. SQL_CATALOG_LOCATION
Returns SQL_CL_START
prev. SQL_CATALOG_NAME
prev. SQL_CATALOG_NAME_SEPARATOR
prev. SQL_CATALOG_TERM
Returns catalog
prev. SQL_CATALOG_USAGE
Returns SQL_CU_DML_STATEMENTS
Catalog names can be used in SELECT, INSERT, UPDATE, DELETE, SELECT FOR UPDATE and positioned UPDATE そして DELETE statements.
Returns SQL_CU_DML_STATEMENTS
Qualifiers can be used in all DML statements (SELECT, INSERT, UPDATE, DELETE, SELECT FOR UPDATE).
Returns SQL_IC_SENSITIVE
Returns catalog
Returns SQL_CL_START
Returns schema
The '\' character is used as an escape character for the '%' and '_' characters in search patterns.
Returns SQL_SC_SQL92_ENTRY
Indicates the supported GRANT statement clauses.
Identifies the predicates of a SELECT statement supported by the server.
Identifies the clauses in a REVOKE statement that are supported by the server.
Indicates the row value constructor expressions in a SELECT statement that are supported by the server.
Indicates the CLI standard the driver conforms to.
Indicates whether changes made to a static cursor by SQLSetPos() or UPDATE or DELETE statements are detected by the application.
Returns SQL_TC_ALL
The publication year of the X/Open specification that the driver manager complies with.


Table of Contents Previous Next