ODBC MSSQL NChar issue lazarus / 16-Databases ---------------------------------------------------------------------- luca · 2021-03-31 20:10 I'm importing some data from the ERP to my local app. ERP and my app are using MSSQL as DBMS. One field (Name) is defined as nchar(20) in both tables. I read one record using a query and insert it in destination table using a parametizer query:  Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i qryDEST.Par amByName('NAME').AsWideString:=qryORI.FieldByName('NAME').AsWideString ;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 ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-03-31 20:37 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 ---------------------------------------------------------------------- luca · 2021-04-01 06:30 Hi, both db are using same charset and they are Unicode compatible. Regards Luca ---------------------------------------------------------------------- luca · 2021-04-01 10:00 I've fixed the problem. There is another field I didn't convert using AsWideString. Now it's working. Regards Luca