TERADATA SQL ERROR 3945: Invalid data length for VarChar, VarByte, orVARGRAPHIC while using JDBC connection

Connectivity

TERADATA SQL ERROR 3945: Invalid data length for VarChar, VarByte, orVARGRAPHIC while using JDBC connection

We are getting this exception when running a query in a web application which coonects to Java API through a web service. The jar being used is terajdbc4.jar and the version of JDBC being used is TeraJDBC 13.00.00.22. I have run the query using bot ANSI mode and Teradata mode both using CLI,ODBC and Terardata.NET;no such error has been seen.

If anybody has experinced this kind of error, please tell us how you solved it or what was the workaround.

Tags (1)
4 REPLIES

Re: TERADATA SQL ERROR 3945: Invalid data length for VarChar, VarByte, orVARGRAPHIC while using JDBC connection

This is the specific error:

Teradata Database] [TeraJDBC 13.00.00.22] [Error 3945] [SQLState HY000] Invalid data length for VarChar, VarByte, or VARGRAPHIC

Teradata Employee

Re: TERADATA SQL ERROR 3945: Invalid data length for VarChar, VarByte, orVARGRAPHIC while using JDBC connection

I recommend that you open an incident with Customer Support, because this is likely to be too complex to troubleshoot here on Developer Exchange.

You will need to enable the LOG=DEBUG connection parameter and obtain the message dumps for the particular request and response messages in which the problem occurs.

Re: TERADATA SQL ERROR 3945: Invalid data length for VarChar, VarByte, orVARGRAPHIC while using JDBC connection

Thanks Tom,

The user that deploys the query through the web serveice says that sometimes the query executes fine and sometimes it throws the error.
However as you said, it appears to be a complex issue and we will need to open a ticket with the Customer support.

Re: TERADATA SQL ERROR 3945: Invalid data length for VarChar, VarByte, orVARGRAPHIC while using JDBC connection

Give sum examples for vargraphic.....