[egenix-users] Data truncation by Microsoft ODBC driver for NVARCHAR

Jan Murre jan.murre at catalyz.nl
Tue Sep 26 16:08:53 CEST 2017


I am query-ing a MS SQL database from Redhat Linux using the "Microsoft
ODBC Driver 13 for SQL Server".

There is a NVARCHAR(30) field in our database that is filled with data
having a 2-byte utf-8 char on the last position. When query-ing, the ODBC
driver issues this warning:

mx.ODBC.Error.Warning: ('01004', 0, '[Microsoft][ODBC Driver 13 for SQL
Server]String data, right truncation', 8668)

This results in corrupted data in the resultsset, because only the first
byte of this 2-byte utf-8 char is in the column.

I tried with serveral settings for 'connection.encoding' and
'connections.stringformat', but without success.

Is this an ODBC driver issue? Would it be possible to work around this with
certain settings of mxODBC?

Regards, Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20170926/9059a15d/attachment.htm

More information about the egenix-users mailing list