The ODBC_SQLGetInfo command returns general information about the driver and data source associated with a connection.
connectionID is a valid connection ID returned by ODBC_SQLAllocConnect and a connection must be established using the ODBC_SQLConnect command.
If the infoType defines the type of information regarding a driver and data source and can be one of the following values:
Constant | ValueSQL_ACTIVE_CONNECTIONS | 0 |
SQL_ACTIVE_ENVIRONMENTS | 116 |
SQL_ACTIVE_STATEMENTS | 1 |
SQL_AGGREGATE_FUNCTIONS | 169 |
SQL_ALTER_DOMAIN | 117 |
SQL_ASYNC_MODE | 10021 |
SQL_BATCH_ROW_COUNT | 120 |
SQL_BATCH_SUPPORT | 121 |
SQL_BOOKMARK_PERSISTENCE | 82 |
SQL_CATALOG_LOCATION | 114 |
SQL_CATALOG_NAME_SEPARATOR | 41 |
SQL_CATALOG_TERM | 42 |
SQL_CATALOG_USAGE | 92 |
SQL_COLUMN_ALIAS | 87 |
SQL_CONCAT_NULL_BEHAVIOR | 22 |
SQL_CONVERT_BIGINT | 53 |
SQL_CONVERT_BINARY | 54 |
SQL_CONVERT_BIT | 55 |
SQL_CONVERT_CHAR | 56 |
SQL_CONVERT_DATE | 57 |
SQL_CONVERT_DECIMAL | 58 |
SQL_CONVERT_DOUBLE | 59 |
SQL_CONVERT_FLOAT | 60 |
SQL_CONVERT_FUNCTIONS | 48 |
SQL_CONVERT_GUID | 173 |
SQL_CONVERT_INTEGER | 61 |
SQL_CONVERT_INTERVAL_DAY_TIME | 123 |
SQL_CONVERT_INTERVAL_YEAR_MONTH | 124 |
SQL_CONVERT_LONGVARBINARY | 71 |
SQL_CONVERT_LONGVARCHAR | 62 |
SQL_CONVERT_NUMERIC | 63 |
SQL_CONVERT_REAL | 64 |
SQL_CONVERT_SMALLINT | 65 |
SQL_CONVERT_TIME | 66 |
SQL_CONVERT_TIMESTAMP | 67 |
SQL_CONVERT_TINYINT | 68 |
SQL_CONVERT_VARBINARY | 69 |
SQL_CONVERT_VARCHAR | 70 |
SQL_CONVERT_WCHAR | 122 |
SQL_CONVERT_WLONGVARCHAR | 125 |
SQL_CONVERT_WVARCHAR | 126 |
SQL_CORRELATION_NAME | 74 |
SQL_CREATE_ASSERTION | 127 |
SQL_CREATE_CHARACTER_SET | 128 |
SQL_CREATE_COLLATION | 129 |
SQL_CREATE_DOMAIN | 130 |
SQL_CREATE_SCHEMA | 131 |
SQL_CREATE_TABLE | 132 |
SQL_CREATE_TRANSLATION | 133 |
SQL_CREATE_VIEW | 134 |
SQL_CURSOR_ROLLBACK_BEHAVIOR | 24 |
SQL_DATETIME_LITERALS | 119 |
SQL_DDL_INDEX | 170 |
SQL_DM_VER | 171 |
SQL_DRIVER_HDBC | 3 |
SQL_DRIVER_HDESC | 135 |
SQL_DRIVER_HENV | 4 |
SQL_DRIVER_HLIB | 76 |
SQL_DRIVER_HSTMT | 5 |
SQL_DRIVER_NAME | 6 |
SQL_DRIVER_ODBC_VER | 77 |
SQL_DRIVER_VER | 7 |
SQL_DROP_ASSERTION | 136 |
SQL_DROP_CHARACTER_SET | 137 |
SQL_DROP_COLLATION | 138 |
SQL_DROP_DOMAIN | 139 |
SQL_DROP_SCHEMA | 140 |
SQL_DROP_TABLE | 141 |
SQL_DROP_TRANSLATION | 142 |
SQL_DROP_VIEW | 143 |
SQL_DYNAMIC_CURSOR_ATTRIBUTES1 | 144 |
SQL_DYNAMIC_CURSOR_ATTRIBUTES2 | 145 |
SQL_EXPRESSIONS_IN_ORDERBY | 27 |
SQL_FILE_USAGE | 84 |
SQL_FORWARD_ONLY_CURSOR_ATTRS1 | 146 |
SQL_FORWARD_ONLY_CURSOR_ATTRS2 | 147 |
SQL_GROUP_BY | 88 |
SQL_INDEX_KEYWORDS | 148 |
SQL_INFO_SCHEMA_VIEWS | 149 |
SQL_INSERT_STATEMENT | 172 |
SQL_KEYSET_CURSOR_ATTRIBUTES1 | 150 |
SQL_KEYSET_CURSOR_ATTRIBUTES2 | 151 |
SQL_KEYWORDS | 89 |
SQL_LIKE_ESCAPE_CLAUSE | 113 |
SQL_LOCK_TYPES | 78 |
SQL_MAX_ASYNC_CONCURRENT_STMTS | 10022 |
SQL_MAX_BINARY_LITERAL_LEN | 112 |
SQL_MAX_CHAR_LITERAL_LEN | 108 |
SQL_MAX_OWNER_NAME_LEN | 32 |
SQL_MAX_PROCEDURE_NAME_LEN | 33 |
SQL_MAX_QUALIFIER_NAME_LEN | 34 |
SQL_MAX_ROW_SIZE_INCLUDES_LONG | 103 |
SQL_MULT_RESULT_SETS | 36 |
SQL_MULTIPLE_ACTIVE_TXN | 37 |
SQL_NEED_LONG_DATA_LEN | 111 |
SQL_NON_NULLABLE_COLUMNS | 75 |
SQL_NUMERIC_FUNCTIONS | 49 |
SQL_ODBC_API_CONFORMANCE | 9 |
SQL_ODBC_INTERFACE_CONFORMANCE | 152 |
SQL_ODBC_SAG_CLI_CONFORMANCE | 12 |
SQL_ODBC_SQL_CONFORMANCE | 15 |
SQL_ODBC_SQL_OPT_IEF | 73 |
SQL_ODBC_VER | 10 |
SQL_OJ_CAPABILITIES | 65003 |
SQL_OUTER_JOINS | 38 |
SQL_OWNER_TERM | 39 |
SQL_OWNER_USAGE | 91 |
SQL_PARAM_ARRAY_ROW_COUNTS | 153 |
SQL_PARAM_ARRAY_SELECTS | 154 |
SQL_POS_OPERATIONS | 79 |
SQL_POSITIONED_STATEMENTS | 80 |
SQL_PROCEDURE_TERM | 40 |
SQL_PROCEDURES | 21 |
SQL_QUALIFIER_LOCATION | 114 |
SQL_QUALIFIER_NAME_SEPARATOR | 41 |
SQL_QUALIFIER_TERM | 42 |
SQL_QUALIFIER_USAGE | 92 |
SQL_QUOTED_IDENTIFIER_CASE | 93 |
SQL_ROW_UPDATES | 11 |
SQL_SCHEMA_TERM | 39 |
SQL_SCHEMA_USAGE | 91 |
SQL_SCROLL_OPTIONS | 44 |
SQL_SQL_CONFORMANCE | 118 |
SQL_SQL92_DATETIME_FUNCTIONS | 155 |
SQL_SQL92_FOREIGN_KEY_DELETE_RULE | 156 |
SQL_SQL92_FOREIGN_KEY_UPDATE_RULE | 157 |
SQL_SQL92_GRANT | 158 |
SQL_SQL92_NUMERIC_VALUE_FUNCTIONS | 159 |
SQL_SQL92_PREDICATES | 160 |
SQL_SQL92_RELATIONAL_JOIN_OPERATORS | 161 |
SQL_SQL92_REVOKE | 162 |
SQL_SQL92_ROW_VALUE_CONSTRUCTOR | 163 |
SQL_SQL92_STRING_FUNCTIONS | 164 |
SQL_SQL92_VALUE_EXPRESSIONS | 165 |
SQL_STANDARD_CLI_CONFORMANCE | 166 |
SQL_STATIC_CURSOR_ATTRIBUTES1 | 167 |
SQL_STATIC_CURSOR_ATTRIBUTES2 | 168 |
SQL_STATIC_SENSITIVITY | 83 |
SQL_STRING_FUNCTIONS | 50 |
SQL_SUBQUERIES | 95 |
SQL_SYSTEM_FUNCTIONS | 51 |
SQL_TABLE_TERM | 45 |
SQL_TIMEDATE_ADD_INTERVALS | 109 |
SQL_TIMEDATE_DIFF_INTERVALS | 110 |
SQL_TIMEDATE_FUNCTIONS | 52 |
SQL_UNION | 96 |
SQL_UNION_STATEMENT | 96 |
The infoValuePtr argument retrieves the information regarding the driver and data source defined by infoType. The value returned depends on the type of information passed to infoType.
For more information, please see the SQLGetInfo function in the MS ODBC API Reference at http://msdn.microsoft.com/en-us/library/ms711681(VS.85).aspx.
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
The following method connects you to a data source and then retrieves information about the driver to find out the level of asynchronous support in the driver: