gpt4 book ai didi

java - 使用 mysql 运行 JDBC 程序时出现此错误

转载 作者:行者123 更新时间:2023-11-30 21:37:42 26 4
gpt4 key购买 nike

<分区>

Loading class com.mysql.jdbc.Driver'. This is deprecated. The new
driver class is
com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. Exception in thread "main" java.sql.SQLException: Can not issue data manipulation statements with executeQuery(). at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) at com.mysql.cj.jdbc.StatementImpl.checkForDml(StatementImpl.java:385) at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:983) at InsertJDBC.main(InsertJDBC.java:22)

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com