hi. i'm still a newbie at this so i am hoping for some help please..
i am using xampp with netbeans for my project. i wrote my coding using jsp page, but when i run the page and submit, it gives out this output:
"java.sql.SQLException: Field '5' doesn't have a default value".
the field that the error pointed out is the field that i didn't include in my jsp page, but field 5 is available in my database. what should i do? i'm sorry if i explain it confusingly..i give an example of my project:
database abc: columns: 1,2,3,4,5
then in my jsp coding, i wrote:
PreparedStatement ps= connection.prepareStatement("INSERT INTO abc(1,2,3,4)" + "VALUES (?,?,?,?)");
where did i go wrong? is it wrong because i didn't include all variables in the database in the jsp page? so do i have to change the coding or do i have to change the database columns? any help is so much appreciated.