New Teradata ODBC Features - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
16.20
Published
August 2020
Language
English (United States)
Last Update
2020-08-25
dita:mapPath
fxv1527114222338.ditamap
dita:ditavalPath
Audience_PDF_product_legacy_odbc_include.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities

Overview

The following features are available in the new Teradata ODBC Driver.

Differences in Driver Implementation

The new driver defaults to Deferred Mode, 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.

There are differences between the old and the new driver's SLOB implementation:
  • The new driver can cache, or attempt to cache, up to 2GB of all SLOBs in a row.
  • The old driver only caches two Response Buffers, up to 32MB.
The new driver has three 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, the new driver will cache up to #3, potentially up to 2GB.

LightWeight Parser

The new driver 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

The new driver provides a mechanism for testing connections. When creating a DSN, you can click the Test button in the Create New Data Source dialog box to check if the driver can connect to the data store using the DSN.

You must provide a username and password to test the connection. However, make sure you do not save your credentials in the DSN, as this presents a security risk.

Connection String Syntax

If a value in a connection string is enclosed in braces ({}), and the value itself contains a closing brace (}) immediately followed by a semicolon (;), the old driver cannot parse it. The new driver 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. The old driver supports this feature for SQLExecute only, while the new driver supports this feature for both SQLExecute and SQLExecDirect.

ASCII Character Session Set

In the old driver, specifying the Client Character Set as ASCII indicates an extended ASCII character set. In the new driver, specifying the Client Character Set as ASCII indicates a standard 7-bit US ASCII character set.

In addition, the new driver follows the 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. The old driver supported extra leading and trailing spaces as well as spaces between the sign and the number, for example, "+ 789", " - 504.E1", " + .123E1 ". The new driver supports leading and trailing spaces, but does not support spaces between the sign and number.

Row Count Results

When executing operations that return row counts (instead of result sets), the old driver returns a value. The new driver returns the value ROW_COUNT_UNKNOWN (-1) except when executing one of the following operations:
  • Insert
  • Update
  • Delete
  • Merge

Creating Stored Procedures

When creating stored procedures, the old driver reports any warnings that occur. The new driver does not report warnings.

Creating User-Defined Functions

When resolving a CREATE request for a UDF (user-defined function), the old driver returns SQL_SUCCESS_WITH_INFO. The new driver returns SQL_NO_DATA_FOUND.

Using Descriptors for SQL_C_NUMERIC

The old driver does not use descriptors to retrieve the precision and scale that SQL_C_NUMERIC data must use, while the new driver uses descriptors to get that information. If the descriptor does not specify these values, then the new 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 Microsoft Support.