Consultor Eletrônico



Kbase P135316: Error 6176 Loading nvarcharmax Field When Length Exceeds 4K Using Unicode
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/29/2009
Status: Verified

SYMPTOM(s):

Error 6176 inserting or updating nvarcharmax field when exceeding 4K

An overflow of a character value. (6176)

Only happens when using SQL server Native Client driver

Error occurs at 8K if it is not Unicode

Any kind of load, insert, import, update statements would fail

FACT(s) (Environment):

OpenEdge 10.1C
MS SQL DataServer
MS SQL 2005

CAUSE:

Bug# OE00174696

CAUSE:

This bug has been observed as updating nvarchar(max) field with > 4K characters using SQL native client driver.
MSSQL 2005 VARCHAR(MAX) type is mapped as SQL_VARCHAR and it's unicode compliant field NVARCHRA(MAX) type is mapped to SQL_WVARCHAR type using SQL native client driver and using these odbc type to bind n/varchar(max) column, SQL native driver does not allow > 8000 bytes data to store into the column.
To insert data > 8000 bytes need to use ODBC type SQL_LONGVARCHAR and SQL_WLONGVARCHAR to bind the n/varchar(max) parameters.
The bug fix makes the parameter binding conditional to SQL native client driver, flagged the FILTAB structure to identify the MAX type using SQL native client.

FIX:

Bug is fixed 10.1C02 and 10.2A