×

Loading...

yup, as far as I know, you should use setByte(), and preapred statment. usually when you read from and write to database, there is a implicit Type exchange, for chinese word, the encode is GB23121(for example), but english is iso-8859-1(for example),

uid (miracle)
sometime you need use String.encode() to get correct answer. have a fun!
(#34079@0)
2001-3-17 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: EJB:when I use "Prepared Statement " to access database(update a record),I set a parameter by "setString",I can not update properly if the string is Chinese ,why?should I use "setBytes"?

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论