I got an error message:
java.sql.SQLException: Field 'supplier_id' doesn't have a default value at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) 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:3277) at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1402) at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1317)
Anyone can help me? My database fields are not empty. but I want to get the following results:
insert into xxx(name,password)values('xxx','xxx'); and insert into xxx(name,password,man)values('xxx','xxx','xxx'); both successes (both in the client - success, but there is an error in the java code, the error code is in the upper header), instead of insert into xxx(name,password)values('xxx','xxx') - false; my mysql jar - mysql-connector-java-5.0.8
java sql mysql
chendurex
source share