不知道哪里错了

来源:2-4 JDBC实战---搭建模型层 Ⅱ

玫瑰肉丝肉啃肉

2016-06-28 21:21

Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION current.date does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)

at com.mysql.jdbc.Util.getInstance(Util.java:387)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:942)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)

at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1192)

at com.rose.dao.GoddessDao.addGoddess(GoddessDao.java:35)

at com.rose.action.GoddessAction.main(GoddessAction.java:34)


写回答 关注

2回答

  • 时间的力量
    2016-07-15 02:05:37

    CURRENT_DATE()   最好把错误的代码贴上来  不然没法帮你

  • mixu727340530
    2016-06-30 11:44:10

    功能current.date不存在。可以参考'Function Name Parsing and Resolution“部分的参考手册

JDBC之 “ 对岸的女孩看过来”

一起领略JDBC的奥秘,为进一步学习集成框架打下良好的基础

99327 学习 · 856 问题

查看课程

相似问题