Home > Back-end > Delphi7 insert into the inserted into the database of Chinese display a question mark
Delphi7 insert into the inserted into the database of Chinese display a question mark
Time:10-12
Insert into sys_user (usercode, username) values (' ' '+ edit1. Text +' ' ', ' ' '+ edit2. Text +' ' ') the corresponding edit2 username here. The text is in Chinese, Chinese are turned into a question mark after inserted into the database, the database is informix username in the data table is char type connection mode is adoconnection + adoquery, adoconnection is through the ini file to connect to the database configuration, is a string of odbc, informix database character set en_US. 819 On the premise of do not change the database, how to modify the statement can be shown in the data table Chinese Has tried to put the string plus DB_LOCALE=zh_CN. 57357; CLIENT_LOCALE=zh_CN. 57357 still doesn't work, N ' ' '+ edit2. Text +' ' '
CodePudding user response:
The database character set problem!!!! But read it should be normal, mysql operation also met this problem before,
CodePudding user response:
Using informix database, it should be is the question about which character set, but I can't move the server again, can only be changed in the statements, warrior, the Chinese after insert into the question how to solve?
CodePudding user response:
Not so easy!!
CodePudding user response:
Take a look at your database character set is Chinese character set
CodePudding user response:
Estimates that can only change the character set, do not know how, the degree of processing,
CodePudding user response:
Estimation is the problem that the database character set, try to change the database character set anyway, ORACLE is like this
CodePudding user response:
This, in general, more difficult
CodePudding user response:
Brother try the Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')
CodePudding user response:
Bad treatment, should be the problem of character set
CodePudding user response:
To change the database character set
CodePudding user response:
Where each receiving data to join N good, just like the eight floor, Insert into sys_user (usercode, username) values (N ' ' '+ edit1. Text +' ' ', N ' ' '+ edit2. Text +' ' ')