• Register
0 votes
449 views

Problem :

I am updating values using JDBC but getting bellow error
java.sql.sqlexception: column count doesn't match value count at row 1
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Probably you are making a mistake with your quotes.

The proper Syntax as bellow:

INSERT INTO tablename(field1,field2) VALUES ('Text1,Text2'); 

So you need to write:

String Query_String = "INSERT INTO tablename(field1,field2) 
VALUES ('"+Text1+"','"+Text2+"')"

Further Readings:

9 7 4
38,600 points

Related questions

0 votes
0 answers 3 views
3 views
Problem: Hi I am facing this iisue can some one help me? column count doesn't match value count at row 1
asked Mar 20 PkGuy 13.1k points
1 vote
4 answers 7 views
7 views
Problem: Hi! Can some one help to solve this problem column count doesn't match value count at row 1 php
asked Mar 20 PkGuy 13.1k points
0 votes
1 answer 2 views
2 views
Problem: PLease help me with my query.It gives me the error, "Column count doesn't match value count at row 1." So I'm lost on the concept of how the column and row apply here.?
asked 1 day ago Sana8989 8.5k points
0 votes
1 answer 44 views
44 views
Problem: Hi, I am new to php database operations. i have written the query and it shows the error column count doesn't match value count at row 1 mysql. INSERT INTO Student VALUES ('Name', 'last name''class');
asked Nov 16, 2020 prog_learner 2.5k points
0 votes
0 answers 2 views
2 views
Problem: Hi can some one help me outwith this issue? column count doesn't match value count
asked Mar 20 PkGuy 13.1k points
0 votes
1 answer 2 views
2 views
Problem: >HELP! I need help understanding this problem? column count doesn't match value count at row
asked 1 day ago Rohit kr 15k points
0 votes
2 answers 84 views
84 views
Problem : I am getting bellow error while trying to execute JDBC code java.sql.sqlexception: operation not allowed after resultset closed
asked Nov 1, 2019 peterlaw 6.9k points
0 votes
1 answer 2 views
2 views
Problem: I need help in resolving this problem: Cells(rows.count, 1).end(xlup).row?
asked 6 days ago tuhin1 47.2k points
0 votes
1 answer 47 views
0 votes
1 answer 14 views