Some catalog functions in the new driver behave differently compared to the old driver. The functions, and the differences between the new driver and the old driver are described in the following sections.
Catalog Function | Description |
---|---|
SQLTables | Returns the value “TYPE” in the TABLE_TYPE column for user-defined types. The type name is returned in the TABLE_NAME column. |
SQLColumns | Returns the value SQL_UNKNOWN_TYPE (zero) in the DATA_TYPE for a UDT column. The UDT name is returned in the TYPE_NAME column. |
SQLProcedures | Returns names of user-defined methods in addition to names of macros, procedures, and user-defined functions. The value of the PROCEDURE_TYPE column for a user-defined method is SQL_PT_PROCEDURE. |
SQLProcedureColumns | Returns parameter information for user-defined methods. Also, parameter types might be UDTs and these are returned as for the SQLColumns catalog function (SQL_UNKNOWN_TYPE in DATA_TYPE column and UDT name in TYPE_NAME column). The output for TD_ANYTYPE parameters results in the value SQL_UNKNOWN_TYPE in the DATA_TYPE column and the string “TD_ANYTYPE” (without quotes) in the TYPE_NAME column. |
All Catalog Functions
The old driver returns some column names differently depending on whether the driver is working in an ODBC 2.x or 3.x environment. The new driver always returns ODBC 3.x column names, even when working in an ODBC 2.x environment.
SQLBindParameter
Binding Date, Time, and Timestamp Literals
When binding any of these types of literals as a parameter, the old driver accepts literals that contain extra spaces. The new driver only accepts literals that are specified in the exact format specified in the ODBC specification. If you try to bind a literal that does not use the required format, the new driver returns the following error:
[Simba][Support] (40550) Invalid character value for cast specification.
For more information about the required format, see Date, Time, and Timestamp Literals in the ODBC Programmers’ Reference located at:
https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/date-time-and-timestamp-literals.
As an example, both drivers accept the value {d '1995-01-15'}, but only the old driver accepts the value { d '1995-01-15'}. Note the missing space in the first value before 'd', but the inserted space in the second value.
Returning Error Information
- The new driver does not support SQL_ARRAY_STATUS_PTR and SQL_DIAG_ROW_NUMBER for parameter sets, so the driver does not set these properties when an error occurs in a query that contains a parameter set.
- If no errors occurred, but some parameter sets were ignored, then the old driver sets SQL_ATTR_PARAMS_PROCESS_PTR to SQL_ATTR PARAMSET_SIZE minus the number of ignored sets. The new driver sets SQL_ATTR_PARAMS_PROCESSED_PTR to the exact value of SQL_ATTR_PARAMSET_SIZE.
This behavior of the new driver is consistent with the ODBC specification.
For more information, see the Error Information in SQLBindParameter Function in the ODBC Programmers’ Reference: https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlbindparameter-function.
Using SQL_DEFAULT_PARAM
- If it is specified in a stored procedure call, the new driver uses the value NULL to complete the stored procedure call and returns SQL_SUCCESS_WITH_INFO.
- If it is specified in something other than a stored procedure call, the new driver returns SQL_ERROR and does not execute the statement.
The behavior of the new driver is consistent with the ODBC specification, which states that SQL_DEFAULT_PARAM is valid only when used with a stored procedure call. Teradata Database does not support default parameters for stored procedures, so the new driver uses NULL as the value for SQL_DEFAULT_PARAM.
For more information, see SQLBindParameter Function in the ODBC Programmers’ Reference: https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlbindparameter-function.
Query Parameter Binding
When binding query parameters, the new driver supports different use cases than the old driver.
Old Driver | New Driver |
---|---|
When binding JSON or WJSON data to a parameter, the old driver returns an error. | The new driver supports binding JSON and WJSON data to parameters. |
The old driver does not support binding for SQL_DECIMAL and SQL_NUMERIC data that has a negative scale. | The new driver supports binding for these types of values, which is consistent with the ODBC specification: https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/decimal-digits. |
The old driver does not support binding for SQL_DECIMAL and SQL_NUMERIC data that has a precision that is less than 1. | The new driver supports binding for SQL_DECIMAL and SQL_NUMERIC data that has a precision of 0, in order to support binding for NULL values. |
When calling SQLBindParameter, the old driver verifies the column sizes of the data and then modifies the column sizes of the input if needed. | The new driver does not verify column sizes or modify the input from SQLBindParameter. When binding LOB data types, the new driver uses the values returned by GetMaxLobBytes() or MaxJSONBytes() as the maximum column size of the LOB data. |
Output Parameter Binding
When binding output parameters, a data type conversion is sometimes required. In this case, the old driver converts the output data to its corresponding SQL type regardless of the data types specified in SQLBindParameter. In contrast, the new driver converts the output data to the specified SQL type, or returns a conversion error if the types are not compatible. The new driver’s behavior is consistent with the ODBC specification.
For example, given the following procedure:
create procedure CharOutputStoredprocedure(OUT param1 CHAR) cs1: BEGIN SET param1 = 'A'; END cs1;
Assume that you bind the output parameters as follows:
SQLBindParameter( stmt, 1, SQL_PARAM_OUTPUT, SQL_C_CHAR, SQL_CHAR, 1024, 0, &out, 1024, &cbRetParam)
The given SQL type is the same as the SQL type of the original parameter, so the data does not need to be converted. The old driver and the new driver both successfully bind the data and return the value A.
However, if you bind the output parameter as follows, then the data must be converted from CHAR to SQL_INTEGER:
SQLBindParameter( stmt, 1, SQL_PARAM_OUTPUT, SQL_C_CHAR, SQL_INTEGER, 1024, 0, &out, 1024, &cbRetParam)
The conversion fails because A is not a valid SQL_INTEGER value. The old driver handles this situation by converting and binding the output data to SQL_CHAR instead. The new driver tries to convert the data to SQL_INTEGER and then returns a conversion error with SQL state 22018.
SQLBindParameter and Data Types with Fractional Seconds
When calling SQLBindParameter with a data type that contains fractional seconds, you must set the DecimalDigit to a value up to 6, the maximum the database supports. Previous to 16.20, this could be any number between 0-6 with the same result as if you were to set it to 6, but this is incorrect and no longer supported.
As an example, TIMESTAMP(0) is no longer valid if you are passing in a fractional second because according to the ODBC specification, you have specified zero decimal digits and will receive an error if you try to pass in a fractional second.
You can specify a maximum of up to 6 decimal digits, as this is the limit of the Teradata Database.
It is acceptable to send less than your specified number of decimal digits.
You can optionally pad out to 9 decimal digits with zeros without issue.
SQLCancel
The new driver responds to timing or processing state of the statement differently than the old driver.
- In ODBC 3.5, SQLCancel has no effect on the statement. To close a cursor, applications need to call SQLCloseCursor instead of SQLCancel.
- In ODBC 2.x, SQLCancel has the same effect as SQLFreeStmt with the SQL_CLOSE option. This behavior is defined only for the sake of completeness; applications should call SQLFreeStmt or SQLCloseCursor instead to close cursors.
For more information, see SQLCancel Function in the ODBC API Reference: https://msdn.microsoft.com/en-us/library/ms714112%28v=vs.85%29.aspx.
Old Driver | New Driver |
---|---|
When executing statements asynchronously, if the execution is completed before SQLCancel is called, the old driver returns HY008. | The new driver returns the result of the statement execution, (SQL_SUCCESS or SQL_ERROR). |
If SQLCancel is called before any processing has been done for the statement, the old driver closes the statement regardless of whether the driver is working in ODBC 2.x mode or ODBC 3.x mode. Closing the statement reflects behavior that is consistent with the ODBC 2.x specification, but not the ODBC 3.x specification. |
The new driver does not close the statement when it is working in ODBC 3.x mode, and this behavior is consistent with the ODBC 3.x specification. |
SQLForeignKeys
In the old driver, the columns UPDATE_RULE and DELETE_RULE are returned as empty strings. In the new driver, these columns are instead returned as NULL.
SQLGetConnectAttr
The following table lists the results of the new and old drivers.
Function | Old Driver Returns | New Driver Returns |
---|---|---|
SQL_ATTR_ASYNC_ENABLE |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HY092", *pfNativeError = 0, *pcbErrorMsg = 50, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Invalid Attribute" |
Return: SQL_SUCCESS=0 Out: *ValuePtr = SQL_ASYNC_ENABLE_OFF = 0, *StringLengthPtr = 4 |
SQL_ATTR_DISCONNECT_BEHAVIOR |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HY092", *pfNativeError = 0, *pcbErrorMsg = 50, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Invalid Attribute" |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HY092", *pfNativeError = 10210, *pcbErrorMsg = 75, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC] (10210) Attribute identifier invalid or not supported: 114" |
SQL_ATTR_ENLIST_IN_DTC |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HY092", *pfNativeError = 0, *pcbErrorMsg = 50, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Invalid Attribute" |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HY092", *pfNativeError = 10210, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC] (10210) Attribute identifier invalid or not supported: 1207" |
SQL_ATTR_PACKET_SIZE |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 44, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Unsupported" |
Return: SQL_SUCCESS=0 Out: *ValuePtr = 4096, *StringLengthPtr = 4 |
SQL_ATTR_TRANSLATE_LIB |
Return: SQL_SUCCESS=0 Out: *ValuePtr = "쨀쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊쫊...", *StringLengthPtr = 0 |
Return: SQL_SUCCESS=0 Out: *ValuePtr = "", *StringLengthPtr = 0 |
SQLGetDiagField
- SQL_DIAG_CURSOR_ROW_COUNT
- SQL_DIAG_ROW_COUNT
SQLGetInfo
The following table lists the results of the new and old drivers.
Function | Old Driver Returns | New Driver Returns |
---|---|---|
SQL_SQL_CONFORMANCE |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = SQL_SC_SQL92_ENTRY = 1, *StringLengthPtr = 4 |
SQL_CATALOG_NAME_SEPARATOR |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = 0 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = ".", *StringLengthPtr = 2 |
SQL_CREATE_TABLE |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000000, *StringLengthPtr = 4 |
SQL_DROP_TABLE |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000000, *StringLengthPtr = 4 |
SQL_DROP_VIEW |
Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000000, *StringLengthPtr = 4 |
SQL_GETDATA_EXTENSIONS |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x0000000B = SQL_GD_ANY_COLUMN | SQL_GD_ANY_ORDER | SQL_GD_BOUND, *StringLengthPtr = 4 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x0000000F = SQL_GD_ANY_COLUMN | SQL_GD_ANY_ORDER | SQL_GD_BLOCK | SQL_GD_BOUND, *StringLengthPtr = 4 |
SQL_INDEX_KEYWORDS |
Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000000, *StringLengthPtr = 4 |
SQL_LOCK_TYPES |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000001 = SQL_LCK_NO_CHANGE, *StringLengthPtr = 4 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000002 = SQL_LCK_EXCLUSIVE, *StringLengthPtr = 4 |
SQL_MAX_ASYNC_CONCURRENT_STATEMENTS |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0, *StringLengthPtr = 4 |
SQL_NUMERIC_FUNCTIONS |
Return: SQL_SUCCESS=0 Out:*InfoValuePtr = 0x00014D01 = SQL_FN_NUM_ABS | SQL_FN_NUM_EXP | SQL_FN_NUM_LOG | SQL_FN_NUM_MOD | SQL_FN_NUM_SQRT | SQL_FN_NUM_PI, StringLengthPtr = 4 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00194D01 = SQL_FN_NUM_ABS | SQL_FN_NUM_EXP | SQL_FN_NUM_LOG | SQL_FN_NUM_MOD | SQL_FN_NUM_SQRT | SQL_FN_NUM_PI | SQL_FN_NUM_LOG10 | SQL_FN_NUM_POWER, *StringLengthPtr = 4 |
SQL_ODBC_SAG_CLI_CONFORMANCE |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = SQL_OSCC_COMPLIANT = 1, *StringLengthPtr = 2 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = SQL_OSCC_NOT_COMPLIANT = 0, *StringLengthPtr = 2 |
SQL_POS_OPERATIONS |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000001 = SQL_POS_POSITION, *StringLengthPtr = 4 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000000, *StringLengthPtr = 4 |
SQL_QUALIFIER_NAME_SEPARATOR |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = 0 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = ".", *StringLengthPtr = 2 |
SQL_SCROLL_CONCURRENCY |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000001 = SQL_SCCO_READ_ONLY, *StringLengthPtr = 4 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000003 = SQL_SCCO_READ_ONLY | SQL_SCCO_LOCK, *StringLengthPtr = 4 |
SQL_SQL92_GRANT |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000010 = SQL_SG_WITH_GRANT_OPTION, *StringLengthPtr = 4 |
SQL_SQL92_PREDICATES |
Return: SQL_ERROR=-1Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00003F07 = SQL_SP_EXISTS | SQL_SP_ISNOTNULL | SQL_SP_ISNULL | SQL_SP_UNIQUE | SQL_SP_LIKE | SQL_SP_IN | SQL_SP_BETWEEN | SQL_SP_COMPARISON | SQL_SP_QUANTIFIED_COMPARISON, *StringLengthPtr = 4 |
SQL_SQL92_RELATIONAL_JOIN_OPERATORS |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x0000015A = SQL_SRJO_CROSS_JOIN | SQL_SRJO_FULL_OUTER_JOIN | SQL_SRJO_INNER_JOIN | SQL_SRJO_LEFT_OUTER_JOIN | SQL_SRJO_RIGHT_OUTER_JOIN, *StringLengthPtr = 4 |
SQL_SQL92_STRING_FUNCTIONS |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000006 = SQL_SSF_LOWER | SQL_SSF_UPPER, *StringLengthPtr = 4 |
SQL_STATIC_SENSITIVITY |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000000, *StringLengthPtr = 4 |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = 0x00000003 = SQL_SS_ADDITIONS | SQL_SS_DELETIONS, *StringLengthPtr = 4 |
SQL_XOPEN_CLI_YEAR |
Return: SQL_ERROR=-1 Out: *InfoValuePtr = <unmodified>, *StringLengthPtr = <unmodified> dbc: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 76, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Driver does not support specified fInfoType" |
Return: SQL_SUCCESS=0 Out: *InfoValuePtr = "1995", *StringLengthPtr = 8 |
SQLGetStmtAttr
The following table lists the results of the new and old drivers.
Function | Old Driver Returns | New Driver Returns |
---|---|---|
SQL_ATTR_CURSOR_SCROLLABLE |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> stmt: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 44, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Unsupported" |
Return: SQL_SUCCESS=0 Out: *ValuePtr = 0, *StringLengthPtr = 4 |
SQL_ATTR_CURSOR_SENSITIVITY |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> stmt: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 44, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Unsupported" |
Return: SQL_SUCCESS=0 Out: *ValuePtr = 0, *StringLengthPtr = 4 |
SQL_ATTR_KEYSET_SIZE |
Return: SQL_SUCCESS=0 Out: *ValuePtr = 0, *StringLengthPtr = <unmodified> |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> stmt: szSqlState = "HY092", *pfNativeError = 10210, *pcbErrorMsg = 73, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC] (10210) Attribute identifier invalid or not supported: 8" |
SQL_ATTR_RETRIEVE_DATA |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> stmt: szSqlState = "HYC00", *pfNativeError = 0, *pcbErrorMsg = 44, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC Teradata Driver] Unsupported" |
Return: SQL_SUCCESS=0 Out: *ValuePtr = SQL_RD_ON = 1, *StringLengthPtr = 4 |
SQL_ATTR_ROW_NUMBER The old driver always returns SQL_ROW_NUMBER_UNKNOWN; the new driver returns the actual number of the current row in the entire result set.
|
Return: SQL_SUCCESS=0 Out: *ValuePtr = 0, *StringLengthPtr = <unmodified> |
Return: SQL_SUCCESS=0 Out: *ValuePtr = 1, *StringLengthPtr = 4 |
SQL_ATTR_SIMULATE_CURSOR |
Return: SQL_SUCCESS=0 Out: *ValuePtr = SQL_SC_NON_UNIQUE = 0, *StringLengthPtr = <unmodified> |
Return: SQL_ERROR=-1 Out: *ValuePtr = <unmodified>, *StringLengthPtr = <unmodified> stmt: szSqlState = "HY092", *pfNativeError = 10210, *pcbErrorMsg = 74, *ColumnNumber = -1, *RowNumber = -1 MessageText = "[Teradata][ODBC] (10210) Attribute identifier invalid or not supported: 10" |
SQLGetTypeInfo
The new driver returns an additional custom column "USER_DATA_TYPE" at index 20.
New driver columns:
1, TYPE_NAME, 9, SQL_VARCHAR=12, 128, 0, SQL_NO_NULLS=0 2, DATA_TYPE, 9, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 3, COLUMN_SIZE, 11, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 4, LITERAL_PREFIX, 14, SQL_VARCHAR=12, 32, 0, SQL_NULLABLE=1 5, LITERAL_SUFFIX, 14, SQL_VARCHAR=12, 32, 0, SQL_NULLABLE=1 6, CREATE_PARAMS, 13, SQL_VARCHAR=12, 32, 0, SQL_NULLABLE=1 7, NULLABLE, 8, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 8, CASE_SENSITIVE, 14, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 9, SEARCHABLE, 10, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 10, UNSIGNED_ATTRIBUTE, 18, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 11, FIXED_PREC_SCALE, 16, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 12, AUTO_UNIQUE_VALUE, 17, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 13, LOCAL_TYPE_NAME, 15, SQL_VARCHAR=12, 128, 0, SQL_NULLABLE=1 14, MINIMUM_SCALE, 13, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 15, MAXIMUM_SCALE, 13, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 16, SQL_DATA_TYPE, 13, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 17, SQL_DATETIME_SUB, 16, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 18, NUM_PREC_RADIX, 14, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 19, INTERVAL_PRECISION, 18, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 20, USER_DATA_TYPE, 14, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 21, TDODBC_DATA_TYPE, 16, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0
Old driver columns:
1, TYPE_NAME, 9, SQL_VARCHAR=12, 39, 0, SQL_NO_NULLS=0 2, DATA_TYPE, 9, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 3, COLUMN_SIZE, 11, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 4, LITERAL_PREFIX, 14, SQL_VARCHAR=12, 11, 0, SQL_NULLABLE=1 5, LITERAL_SUFFIX, 14, SQL_VARCHAR=12, 18, 0, SQL_NULLABLE=1 6, CREATE_PARAMS, 13, SQL_VARCHAR=12, 18, 0, SQL_NULLABLE=1 7, NULLABLE, 8, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 8, CASE_SENSITIVE, 14, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 9, SEARCHABLE, 10, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 10, UNSIGNED_ATTRIBUTE, 18, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 11, FIXED_PREC_SCALE, 16, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 12, AUTO_UNIQUE_VALUE, 17, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 13, LOCAL_TYPE_NAME, 15, SQL_VARCHAR=12, 39, 0, SQL_NULLABLE=1 14, MINIMUM_SCALE, 13, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 15, MAXIMUM_SCALE, 13, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 16, SQL_DATA_TYPE, 13, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 17, SQL_DATETIME_SUB, 16, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 18, NUM_PREC_RADIX, 14, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 19, INTERVAL_PRECISION, 18, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 20, TDODBC_DATA_TYPE, 16, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0
SQLProcedureColumns
The old driver uses SQL_VARCHAR for string columns. The new driver uses SQL_WVARCHAR for string columns and returns two additional custom columns, at index 20 and 21.
New driver columns:
1, PROCEDURE_CAT, 13, SQL_VARCHAR=12, 1024, 0, SQL_NULLABLE=1 2, PROCEDURE_SCHEM, 15, SQL_VARCHAR=12, 30, 0, SQL_NULLABLE=1 3, PROCEDURE_NAME, 14, SQL_VARCHAR=12, 30, 0, SQL_NO_NULLS=0 4, COLUMN_NAME, 11, SQL_VARCHAR=12, 30, 0, SQL_NO_NULLS=0 5, COLUMN_TYPE, 11, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 6, DATA_TYPE, 9, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 7, TYPE_NAME, 9, SQL_VARCHAR=12, 128, 0, SQL_NO_NULLS=0 8, COLUMN_SIZE, 11, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 9, BUFFER_LENGTH, 13, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 10, DECIMAL_DIGITS, 14, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 11, NUM_PREC_RADIX, 14, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 12, NULLABLE, 8, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 13, REMARKS, 7, SQL_VARCHAR=12, 254, 0, SQL_NULLABLE=1 14, COLUMN_DEF, 10, SQL_VARCHAR=12, 4000, 0, SQL_NULLABLE=1 15, SQL_DATA_TYPE, 13, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 16, SQL_DATETIME_SUB, 16, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 17, CHAR_OCTET_LENGTH, 17, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 18, ORDINAL_POSITION, 16, SQL_INTEGER=4, 10, 0, SQL_NO_NULLS=0 19, IS_NULLABLE, 11, SQL_VARCHAR=12, 254, 0, SQL_NULLABLE=1 20, IS RESULT SET COLUMN, 20, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 21, USER_DATA_TYPE, 14, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 22, TDODBC_DATA_TYPE, 16, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0
Old driver columns:
1, PROCEDURE_CAT, 13, SQL_VARCHAR=12, 128, 0, SQL_NULLABLE=1 2, PROCEDURE_SCHEM, 15, SQL_VARCHAR=12, 128, 0, SQL_NULLABLE=1 3, PROCEDURE_NAME, 14, SQL_VARCHAR=12, 128, 0, SQL_NO_NULLS=0 4, COLUMN_NAME, 11, SQL_VARCHAR=12, 128, 0, SQL_NO_NULLS=0 5, COLUMN_TYPE, 11, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 6, DATA_TYPE, 9, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 7, TYPE_NAME, 9, SQL_VARCHAR=12, 128, 0, SQL_NO_NULLS=0 8, COLUMN_SIZE, 11, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 9, BUFFER_LENGTH, 13, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 10, DECIMAL_DIGITS, 14, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 11, NUM_PREC_RADIX, 14, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 12, NULLABLE, 8, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 13, REMARKS, 7, SQL_VARCHAR=12, 254, 0, SQL_NULLABLE=1 14, COLUMN_DEF, 10, SQL_VARCHAR=12, 60, 0, SQL_NULLABLE=1 15, SQL_DATA_TYPE, 13, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0 16, SQL_DATETIME_SUB, 16, SQL_SMALLINT=5, 5, 0, SQL_NULLABLE=1 17, CHAR_OCTET_LENGTH, 17, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 18, ORDINAL_POSITION, 16, SQL_INTEGER=4, 10, 0, SQL_NO_NULLS=0 19, IS_NULLABLE, 11, SQL_VARCHAR=12, 3, 0, SQL_NULLABLE=1 20, TDODBC_DATA_TYPE, 16, SQL_SMALLINT=5, 5, 0, SQL_NO_NULLS=0
SQLTables
When using pattern matching with a wildcard character (%), the default catalog metadata is null, so the new driver returns SQL_INTEGER as the SQL Type for some columns.
For example, for the following call:
SQLTables(<empty string>, %, <empty string>, <null pointer>)
New driver returns:
icol, szColName, *pcbColName, *pfSqlType, *pcbColDef, *pibScale, *pfNullable 1, TABLE_CAT, 9, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 2, TABLE_SCHEM, 11, SQL_VARCHAR=12, 128, 0, SQL_NULLABLE=1 3, TABLE_NAME, 10, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 4, TABLE_TYPE, 10, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 5, REMARKS, 7, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1
Old driver returns:
icol, szColName, *pcbColName, *pfSqlType, *pcbColDef, *pibScale, *pfNullable 1, TABLE_CAT, 9, SQL_VARCHAR=12, 128, 0, SQL_NULLABLE=1 2, TABLE_SCHEM, 11, SQL_VARCHAR=12, 128, 0, SQL_NULLABLE=1 3, TABLE_NAME, 10, SQL_VARCHAR=12, 128, 0, SQL_NULLABLE=1 4, TABLE_TYPE, 10, SQL_VARCHAR=12, 17, 0, SQL_NULLABLE=1 5, REMARKS, 7, SQL_VARCHAR=12, 254, 0, SQL_NULLABLE=1