17.20 - ODBC Driver for Teradata 16.20 Features - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2022-06-21
dita:mapPath
uqj1639470627591.ditamap
dita:ditavalPath
nkw1500504256726.ditaval

Overview

The following features were introduced in ODBC Driver for Teradata 16.20.

LOB and Smart LOB (SLOB) Support

ODBC Driver for Teradata 16.20 defaults to Deferred Mode for LOB data, as this is faster if you do not want to cache into memory. SLOB is better in certain cases, such as when working with geospatial data.

Starting with 16.20, ODBC Driver for Teradata can cache, or attempt to cache, up to 2 GB of all SLOBS in a row. In 16.10 and previous versions, the driver could only cache two Response Buffers, up to 32 MB.

Starting with 16.20, ODBC Driver for Teradata includes three new configuration parameters:
  • 1- Enable SLOB Random Access
  • 2- Max size of one SLOB
  • 3- Max size of all SLOBs in a Row

When #1 is set to True, ODBC Driver for Teradata will cache up to #3, potentially up to 2 GB.

LightWeight Parser

Starting with the 16.20 version of the driver, ODBC Driver for Teradata uses a proprietary parsing mechanism to replace Teradata’s LightWeightParser (LWP). This implementation of the LWP streamlines maintenance and overcomes non-trivial issues that exist in the original LWP.

Connection Testing

Starting with the 16.20 version of the driver, ODBC Driver for Teradata provides a mechanism for testing connections. When creating a DSN, you can click Test in the Create New Data Source dialog box to verify the driver can connect to the data store using the DSN.

You must provide a username and password to test the connection. Beginning with 17.00, you cannot save a password to the DSN as this presents a security risk.

Connection String Syntax

In 16.10 and prior versions of the driver, if a value in a connection string is enclosed in braces ({}), and the value itself contains a closing brace (}) immediately followed by a semicolon (;), ODBC Driver for Teradata could not parse it. Starting with 16.20, ODBC Driver for Teradata can parse these values successfully, but the closing brace within the value must be escaped with another closing brace.

For example, in a connection string where the UID property is set to the value {};, you must specify it as follows: UID= {{}};}

Return Generated Keys

The Return Generated Keys option, or the ReturnGeneratedKeys connection property, enables the driver to return the RowCount and ResultSet from requests that insert data into identity columns. In 16.10 and prior versions of the driver, ODBC Driver for Teradata supported this feature for SQLExecute only. Starting with 16.20, ODBC Driver for Teradata supports this feature for both SQLExecute and SQLExecDirect.

ASCII Character Session Set

In 16.10 and prior versions of the driver, specifying the Client Character Set as ASCII in ODBC Driver for Teradata indicates an extended ASCII character set.

Starting with 16.20, specifying the Client Character Set as ASCII in ODBC Driver for Teradata indicates a standard 7-bit US ASCII character set. In addition, the driver follows the Teradata Vantage™ - Advanced SQL Engine International Character Set Support, B035-1125 documentation. If any characters are used that are outside the 7-bit ASCII range, that is, characters with values from 0x80 to 0xff, then a language-specific session character set should be used.

Converting between CHAR and Numeric Values

When converting data from CHAR to numeric values, if the CHAR is not a standard valid representation of a number then the conversion fails. In 16.10 and prior versions of the driver, ODBC Driver for Teradata supported extra leading and trailing spaces as well as spaces between the sign and the number, for example, "+ 789", " - 504.E1", " + .123E1 ". Starting with 16.20, ODBC Driver for Teradata supports leading and trailing spaces, but does not support spaces between the sign and number.

Row Count Results

In 16.10 and prior versions of the driver, when executing operations that return row counts (instead of result sets), ODBC Driver for Teradata returned a value. Starting with 16.20, ODBC Driver for Teradata returns the value ROW_COUNT_UNKNOWN (-1) except when executing one of the following operations:
  • Insert
  • Update
  • Delete
  • Merge

Creating Stored Procedures

In 16.10 and prior versions of the driver, when creating stored procedures, ODBC Driver for Teradata reported any warnings that occur. Starting with 16.20, ODBC Driver for Teradata no longer reports warnings.

Creating User-Defined Functions

In 16.10 and prior versions of the driver, when resolving a CREATE request for a UDF (user-defined function), ODBC Driver for Teradata returned SQL_SUCCESS_WITH_INFO. Starting with 16.20, ODBC Driver for Teradata returns SQL_NO_DATA_FOUND.

Using Descriptors for SQL_C_NUMERIC

In 16.10 and prior versions of the driver, ODBC Driver for Teradata did not use descriptors to retrieve the precision and scale that SQL_C_NUMERIC data must use.

Starting with 16.20, ODBC Driver for Teradata now uses descriptors to get that information. In addition, if the descriptor does not specify these values, then the driver uses the default values of 39 for precision and 0 for scale.

For more information, see "HOWTO: Retrieving Numeric Data with SQL_NUMERIC_STRUCT" from https://docs.microsoft.com/en-us/sql/odbc/reference/appendixes/retrieve-numeric-data-sql-numeric-struct-kb222831?view=sql-server-ver15.