Known Issues for SAP Adaptive Server Enterprise ODBC Driver

Known problems and workarounds, if any, for SAP Adaptive Server Enterprise ODBC Driver.

SAP Adaptive Server Enterprise ODBC Driver issues
CR# Description
682086

The bulk insert functionality of the ODBC Driver available with SQLBulkOperations has not been tested with large object (LOB) columns marked for in-row storage on allpages-locked (APL) tables. Using this API against such APL tables could result in errors or corrupted data.

Workaround: Do not mark LOB columns for in-row storage on APL tables if you are using SQLBulkOperations to bulk load data into the tables.

You see an error if you do not specify the precision and scale using the ODBC API method – SQLSetDescField – when retrieving data from numeric or decimal columns in a table.

Workaround: Specify the SQLSetDescField with value types SQL_DESC_PRECISION and SQL_DESC_SCALE.

This code illustrates how to retrieve a numeric column from a table specifying a precision and scale.

/*
Insert values
Execute select statement
*/

/*
Fetch Values
*/

#define ROW_SIZE 10
SQLRETURN sr;
SQL_NUMERIC_STRUCT      g[ROW_SIZE];
SQLLEN  gLen[ROW_SIZE];
SQLINTEGER intVal[ROW_SIZE];
SQLLEN intLen[ROW_SIZE];;

sr = SQLBindCol(hStmt, 1, SQL_C_LONG, intVal, sizeof(SQLINTEGER), intLen);
sr = SQLBindCol(hStmt, 2, SQL_C_NUMERIC, g, sizeof(SQL_NUMERIC_STRUCT), gLen);

SQLHDESC hdesc = NULL;
SQLGetStmtAttr(hStmt, SQL_ATTR_APP_ROW_DESC, &hdesc, 0, NULL);
SQLSetDescField(hdesc, 2, SQL_DESC_PRECISION, SQLPOINTER) 5, 0);
SQLSetDescField(hdesc, 2, SQL_DESC_SCALE, (SQLPOINTER) 2, 0);
SQLUSMALLINT rowStatus[ROW_SIZE];

sr = SQLSetStmtAttr(hStmt, SQL_ATTR_ROW_STATUS_PTR, rowStatus, 0);
for (short i = 0; i < ROW_SIZE; i++)
{
	 memset(&g[i], '\0', sizeof(SQL_NUMERIC_STRUCT));
	 memset(g[i].val, 0, 16);
}
sr = SQLFetch(StatementHandle);

See the Microsoft ODBC API Reference at http://msdn.microsoft.com/en-us/library/ms713560%28v=VS.85%29.aspx.

Unsupported ODBC features. Adaptive Server ODBC Driver version 15.7 does not support the Kerberos network traffic encryption.

Workaround: None.

Behavior change when datetime parameter is out of range.

Workaround: When you use Adaptive Server ODBC Driver 15.0 or earlier, or connect to Adaptive Server version 15.0.x or earlier, and the application binds a datetime parameter to an invalid datetime range, such as 01-01-0001, the Adaptive Server ODBC Driver returns error 30122, Invalid datetime field. Year is out of range.

For an Adaptive Server ODBC Driver 15.5 that is connected to Adaptive Server 15.7, this behavior has changed. In the 15.7 versions, Adaptive Server ODBC Driver sends the date to Adaptive Server, and Adaptive Server returns an error. The error code returned is 247, Arithmetic overflow during implicit conversion of BIGDATETIME value 'Jan 1 0001 12:00AM' to a DATETIME field, or something similar.