07-03-12, 06:05 #1Registered User
- Join Date
- Jul 2012
Unanswered: Insert data via ODBC to DB (AS400/DB2) problem
I've got a problem when I try to insert record into
Physicl file (AS400) that CCSID is 838.
I used SQL statement on VB.net with ODBC connection
"INSERT INTO ..... VALUES (parm1, parm2, parm3)"
*parm3 is containning thai language string
Statement SQL run completely but when I query result record
(via emulator workstation accessing AS400 OS)
I found green tap on the field that I was insert thai language
It can not translate from thai language in my application (VB.NET)
into database on AS400
How can I fix this problem?
07-03-12, 12:16 #2Resident Curmudgeon
Provided Answers: 54
- Join Date
- Feb 2004
- In front of the computer
The intuitive answers would be to add code within your .NET app to handle UTF-8 encoding for the column that stores the Thai text. This will often make the string longer, so it might require other changes (like changing the column DDL to make it longer).
Another approach would be to ensure that your application really does pass Unicode to the database (don't assume this, confirm it) then change the DDL for the column to allow it to store Unicode data.
-PatPIn theory, theory and practice are identical. In practice, theory and practice are unrelated.