If the Name is a string composed only of one byte char all is fine. If the Name contains 20 chars and one of them is a unicode char (example ยต) I received the error from MSSQL: string binary will be truncated.
In Debug I see the right text.
Is it an error in my program or is it a limitation in ODBCConn?
Regards Luca
Title: Re: ODBC MSSQL NChar issue
Post by: Gustavo 'Gus' Carreno on March 31, 2021, 10:37:26 pm
Hey Luca,
Can't really answer your question 100% and for that I'm sorry.
But in the mean time, let's cover our bases:
Are both databases/tables using same charset?
If so, are they both Unicode compatible and interchangeable?
If so, then I bow out and let the real experts take charge of this one.
I'm still learning, myself, which type of string to use when dealing with Unicode stuff...
Cheers, Gus
Title: Re: ODBC MSSQL NChar issue
Post by: luca on April 01, 2021, 08:30:01 am
Hi, both db are using same charset and they are Unicode compatible.
Regards Luca
Title: Re: ODBC MSSQL NChar issue
Post by: luca on April 01, 2021, 12:00:25 pm
I've fixed the problem. There is another field I didn't convert using AsWideString.