MariaDB社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3091|回复: 0
打印 上一主题 下一主题

MySQL无法存入中文信息

[复制链接]
跳转到指定楼层
1#
发表于 2009-2-26 22:19:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
MySQL版本5.0,tomcat版本5.5;

MySQL中使用SHOW VARIABLES命令,获得的相关字符编码:
| character_set_client            | utf8                                                   
| character_set_connection        | utf8
| character_set_database          | gb2312
| character_set_filesystem        | binary
| character_set_results           | utf8
| character_set_server            | utf8
| character_set_system            | utf8

JSP网页编码一律为gb2312;

log4j显示的日志 :
2009-02-26 21:46:23,739 DEBUG com.sung.run.ProductBase  method:com.sung.run.ProductBase.insert(ProductBase.java:123)
Syntax error or access violation,  message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''测' at line 1"

相对应的语句:
insert into product(cid,brand,name,code,specification,series,keywords,amount,click,alive,storePrice,marketPrice,remark,description,imgB,
imgS,postDate) values('','','测','','','2','',0,0,0,23.0,0.0,'','','','','2009-02-26')

检查了近一天,实在是不知道哪出了问题,求助!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 转播转播 分享分享 分享淘帖 顶 踩
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|手机版|MariaDB社区 ( 京ICP备07012489号    |
业务联系: QQ:48474881; 邮箱: 48474881@qq.com; 电话:13911732319
声明:本站部分文章是网友转载,若未经作者同意或署名有误,请联系网站管理员。

GMT+8, 2024-9-20 06:19 , Processed in 0.059349 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表