Unicode Conversion Error using 13.10 and 14.0 ODBC

Connectivity
Teradata Employee

Unicode Conversion Error using 13.10 and 14.0 ODBC

We are testing one of our applications and some of tests fail with the following error 

Teradata.Twm.Data.DataAccessException:  Unicode Conversion Error ---> System.Data.Odbc.OdbcException: ERROR [HY000] [Teradata][ODBC Teradata Driver][Teradata Database] Unicode Conversion Error

   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)

   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)

   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)

   at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()

   at Teradata.Twm.Data.SqlExecutor.Execute(IDbCommand cmd)

   --- End of inner exception stack trace ---

   at Teradata.Twm.DataMining.Tdat.AdvertiseManager.AdvertiseToDatabase(MiningSource miningSource, AdvertiseStatistics advertiseStatistics)

   at Teradata.Twm.DataMining.Tdat.Reorganization.RefreshAnalysis.AdvertiseOutputTable()

   at Teradata.Twm.DataMining.Tdat.Reorganization.RefreshAnalysis.OnExecute(IDbConnection cnn)

   at Teradata.Twm.DataMining.Analysis.Execute(IDbConnection cnn, Boolean analysisReference)

Failed SQL or error:

INSERT INTO "unit_test_user"."TWMX_ObjectAnalyses" ("ObjectDatabase", "ObjectName", "SequenceId", "MetadataDatabase", "AnalysisName", "AnalysisType", "AnalysisDescription", "AnalysisCreated", "ProjectName", "ProjectDescription", "ProjectCreated", "StartExecution", "StopExecution") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

Trying to fig out if this is an odbc  error in 13.10 and probably 14.0   

3 REPLIES
Teradata Employee

Re: Unicode Conversion Error using 13.10 and 14.0 ODBC

I would start, checking the "Session Character set" option in ODBC DSN.  Does it appropriately set to match your character data?

Teradata Employee

Re: Unicode Conversion Error using 13.10 and 14.0 ODBC

the session character set is set to match the character data correctly. still the tests fail...are there any reported issues on the odbc dirvers ?

Teradata Employee

Re: Unicode Conversion Error using 13.10 and 14.0 ODBC

It seems that the Teradata Database generated the error:

"[Teradata Database] Unicode Conversion Error"

This application is using the "Microsoft .NET Data Provider for ODBC". Therefore the incoming data is Unicode and the Data will be passed to the Teradata Database without conversion when the session character set is UTF16.

If the issue persist with the UTF16 session character set; then you must check the column attributes; specifically the "Character Set" attribute (e.g. "Col1 VarChar(100) Character Set UNICODE").