注册 登录
编程论坛 J2EE论坛

有没有人知道这是什么错误啊??

阅逡 发布于 2007-08-02 14:24, 438 次点击
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'like) values('123','111111','111111','??','3455443535345')' at line 1 SQL异常!
4 回复
#2
阅逡2007-08-02 14:25
我的SQL语句是这样定义的
sqlString="insert into userinfo(username,password,email,sex,like)"+
" values('"+username+"','"+password+"','"+email+"','"+sex+"','"+userMessage+"')";
#3
支离破碎2007-08-02 22:46
like是什么?字段列表写传入的字段个数不一致
#4
yushui2007-08-03 11:43
楼主可以先在查询分析器里把你的sql语句调试出来了 再放进来 呵呵
#5
sailyyang2007-08-03 14:40
应该是编码方面的问题
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'like) values('123','111111','111111','??','3455443535345')' at line 1 SQL异常!

你不觉得问号有嫌疑?

也许是你插入数据库的数据是中文
那你应该看下 这方面的资料
1