Feedback
Did this article resolve your question/issue?

   

Article

Teradata error "Data length is invalid for the data type" with varchar(64000) column

Information

 
TitleTeradata error "Data length is invalid for the data type" with varchar(64000) column
URL Nameteradata-error-data-length-is-invalid-for-the-data-type-with-varchar-64000-column
Article Number000123537
EnvironmentProduct: Connect/Connect64 XE for ODBC Teradata driver
Version: 7.1
OS: All supported platforms
Database: Teradata
Application: All supported applications
Question/Problem Description
After increasing the MAX length for the LONG VARCHAR datatype from 32k to 64k in a Unicode Teradata database, the error below is returned when inserting data.
Steps to Reproduce1. Create table on Teradata 16.20.23.01 server
CREATE MULTISET TABLE TAB_LONG_VARCHAR_lengthMax (col_int INT NULL,col_longVarchar LONG VARCHAR NULL )
2. Try insert data using parameterized statement
INSERT INTO TAB_LONG_VARCHAR_lengthMax (col_int,col_longVarchar) VALUES (?,?) 
First parameter value: 1
Second:"DD: Engine mode"
Clarifying Information
Error MessageDIAG [S1000] [DataDirect][ODBC Teradata Client driver][Teradata]Data length is invalid for the data type. (-3944) 
Defect Number
Enhancement Number
Cause
The maximum size of a varchar column in a Unicode Teradata database is 32000 characters.
Teradata documentation, SQL Types and Literals, Character and CLOB Data Types, VARCHAR Data Type
Resolution
Change the MAX length for the LONG VARCHAR data type back to 32000.
Workaround
Notes
Last Modified Date6/21/2019 9:28 PM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.