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 'J_H':'';var G_rtop=+new Date,_gaq=[
['_setAccount','UA-464026-1'],
['_addOrganic' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
at com.mycompany.cpp.MySpider.MySql.insertSQL(MySql.java:48)
at com.mycompany.cpp.MySpider.Spider.processHtml(Spider.java:80)
at com.mycompany.cpp.MySpider.Spider.search(Spider.java:45)
at com.mycompany.cpp.MySpider.Spider.run(Spider.java:151)
at java.lang.Thread.run(Thread.java:745)
Java+MySQL插入html(String类型)时出错,保存类型是longtext,求大神谢谢了
答案:2 悬赏:60 手机版
解决时间 2021-01-31 23:49
- 提问者网友:世勋超人
- 2021-01-31 19:57
最佳答案
- 五星知识达人网友:独钓一江月
- 2021-01-31 20:21
这个是你向数据库中插入的数据类型与数据库不符造成的
全部回答
- 1楼网友:空山清雨
- 2021-01-31 21:36
搜一下:Java+MySQL插入html(String类型)时出错,保存类型是longtext,求大神谢谢了
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯