gpt4 book ai didi

java - 列数与第 1 行 java 的值数不匹配

转载 作者:太空宇宙 更新时间:2023-11-03 11:30:39 25 4
gpt4 key购买 nike

<分区>

String query = "INSERT INTO用户(int,fname,lname, code>age,sname,bname) VALUES ('"+jTextField_FirstName.getText()+"','"+jTextField_LastName.getText()+"' ,"+jTextField_Age.getText()+",'"+jTextField_SName.getText()+"','"+jTextField_BName.getText()+"')";

这是堆栈跟踪:

java.sql.SQLException: Column count doesn't match value count at row 1 at     
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965) at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976) at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912) at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) at
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2482) at
com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)

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