Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Column count not matching the amount of columns in database

 
A Joseph
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am having a problem with the above error being produced from my code



In the query variable I have



In the SQL code my schema is set up like this



My problem is that two of my columns are set automatically (userID, userLocked). So I thought all I need to set is the userName and password. But whenever I run this code I get the error Column count doesn't match value count at row 1. So how do I represent these columns without setting them in the code? Thanks in advance for any advice.
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"zero byte", please check your private messages for an administrative matter.
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should use "insert into table (columnA, columnB) values (?, ?)"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic